Move the verbose asm option to be part of the options struct and
[oota-llvm.git] / include / llvm / MC / MCTargetOptions.h
1 //===- MCTargetOptions.h - MC Target Options -------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef LLVM_MC_MCTARGETOPTIONS_H
11 #define LLVM_MC_MCTARGETOPTIONS_H
12
13 namespace llvm {
14
15 class MCTargetOptions {
16 public:
17   enum AsmInstrumentation {
18     AsmInstrumentationNone,
19     AsmInstrumentationAddress
20   };
21
22   /// Enables AddressSanitizer instrumentation at machine level.
23   bool SanitizeAddress : 1;
24
25   unsigned MCRelaxAll : 1;
26   unsigned MCNoExecStack : 1;
27   unsigned MCSaveTempLabels : 1;
28   unsigned MCUseDwarfDirectory : 1;
29   unsigned ShowMCEncoding : 1;
30   unsigned ShowMCInst : 1;
31   unsigned AsmVerbose : 1;
32   MCTargetOptions();
33 };
34
35 inline bool operator==(const MCTargetOptions &LHS, const MCTargetOptions &RHS) {
36 #define ARE_EQUAL(X) LHS.X == RHS.X
37   return (ARE_EQUAL(SanitizeAddress) &&
38           ARE_EQUAL(MCRelaxAll) &&
39           ARE_EQUAL(MCNoExecStack) &&
40           ARE_EQUAL(MCSaveTempLabels) &&
41           ARE_EQUAL(MCUseDwarfDirectory) &&
42           ARE_EQUAL(ShowMCEncoding) &&
43           ARE_EQUAL(ShowMCInst) &&
44           ARE_EQUAL(AsmVerbose));
45 #undef ARE_EQUAL
46 }
47
48 inline bool operator!=(const MCTargetOptions &LHS, const MCTargetOptions &RHS) {
49   return !(LHS == RHS);
50 }
51
52 } // end namespace llvm
53
54 #endif