LLVM  4.0.0
MCTargetOptions.h
Go to the documentation of this file.
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 #include <string>
14 #include <vector>
15 
16 namespace llvm {
17 
18 enum class ExceptionHandling {
19  None, /// No exception support
20  DwarfCFI, /// DWARF-like instruction based exceptions
21  SjLj, /// setjmp/longjmp based exceptions
22  ARM, /// ARM EHABI
23  WinEH, /// Windows Exception Handling
24 };
25 
26 class StringRef;
27 
29 public:
33  };
34 
35  /// Enables AddressSanitizer instrumentation at machine level.
36  bool SanitizeAddress : 1;
37 
38  bool MCRelaxAll : 1;
39  bool MCNoExecStack : 1;
40  bool MCFatalWarnings : 1;
41  bool MCNoWarn : 1;
43  bool MCSaveTempLabels : 1;
47  bool ShowMCEncoding : 1;
48  bool ShowMCInst : 1;
49  bool AsmVerbose : 1;
50 
51  /// Preserve Comments in Assembly.
53 
55 
56  /// getABIName - If this returns a non-empty string this represents the
57  /// textual name of the ABI that we want the backend to use, e.g. o32, or
58  /// aapcs-linux.
59  StringRef getABIName() const;
60  std::string ABIName;
61 
62  /// Additional paths to search for `.include` directives when using the
63  /// integrated assembler.
64  std::vector<std::string> IASSearchPaths;
65 
67 };
68 
69 inline bool operator==(const MCTargetOptions &LHS, const MCTargetOptions &RHS) {
70 #define ARE_EQUAL(X) LHS.X == RHS.X
71  return (ARE_EQUAL(SanitizeAddress) &&
72  ARE_EQUAL(MCRelaxAll) &&
73  ARE_EQUAL(MCNoExecStack) &&
74  ARE_EQUAL(MCFatalWarnings) &&
75  ARE_EQUAL(MCNoWarn) &&
76  ARE_EQUAL(MCNoDeprecatedWarn) &&
77  ARE_EQUAL(MCSaveTempLabels) &&
78  ARE_EQUAL(MCUseDwarfDirectory) &&
79  ARE_EQUAL(MCIncrementalLinkerCompatible) &&
80  ARE_EQUAL(MCPIECopyRelocations) &&
81  ARE_EQUAL(ShowMCEncoding) &&
83  ARE_EQUAL(AsmVerbose) &&
85  ARE_EQUAL(ABIName) &&
86  ARE_EQUAL(IASSearchPaths));
87 #undef ARE_EQUAL
88 }
89 
90 inline bool operator!=(const MCTargetOptions &LHS, const MCTargetOptions &RHS) {
91  return !(LHS == RHS);
92 }
93 
94 } // end namespace llvm
95 
96 #endif
std::vector< std::string > IASSearchPaths
Additional paths to search for .include directives when using the integrated assembler.
DWARF-like instruction based exceptions.
bool SanitizeAddress
Enables AddressSanitizer instrumentation at machine level.
setjmp/longjmp based exceptions
cl::opt< bool > ShowMCInst("asm-show-inst", cl::desc("Emit internal instruction representation to ""assembly file"))
bool PreserveAsmComments
Preserve Comments in Assembly.
cl::opt< int > DwarfVersion("dwarf-version", cl::desc("Dwarf version"), cl::init(0))
cl::opt< std::string > ABIName("target-abi", cl::Hidden, cl::desc("The name of the ABI to be targeted from the backend."), cl::init(""))
bool operator!=(uint64_t V1, const APInt &V2)
Definition: APInt.h:1724
StringRef getABIName() const
getABIName - If this returns a non-empty string this represents the textual name of the ABI that we w...
#define ARE_EQUAL(X)
ExceptionHandling
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:47
No exception support.
bool operator==(uint64_t V1, const APInt &V2)
Definition: APInt.h:1722