1 //===- MCTargetOptions.h - MC Target Options -------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_MC_MCTARGETOPTIONS_H
11 #define LLVM_MC_MCTARGETOPTIONS_H
18 enum class ExceptionHandling {
19 None, /// No exception support
20 DwarfCFI, /// DWARF-like instruction based exceptions
21 SjLj, /// setjmp/longjmp based exceptions
23 WinEH, /// Windows Exception Handling
28 class MCTargetOptions {
30 enum AsmInstrumentation {
31 AsmInstrumentationNone,
32 AsmInstrumentationAddress
35 /// Enables AddressSanitizer instrumentation at machine level.
36 bool SanitizeAddress : 1;
39 bool MCNoExecStack : 1;
40 bool MCFatalWarnings : 1;
42 bool MCNoDeprecatedWarn : 1;
43 bool MCSaveTempLabels : 1;
44 bool MCUseDwarfDirectory : 1;
45 bool MCIncrementalLinkerCompatible : 1;
46 bool MCPIECopyRelocations : 1;
47 bool ShowMCEncoding : 1;
51 /// Preserve Comments in Assembly.
52 bool PreserveAsmComments : 1;
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
59 StringRef getABIName() const;
62 /// Additional paths to search for `.include` directives when using the
63 /// integrated assembler.
64 std::vector<std::string> IASSearchPaths;
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) &&
82 ARE_EQUAL(ShowMCInst) &&
83 ARE_EQUAL(AsmVerbose) &&
84 ARE_EQUAL(DwarfVersion) &&
86 ARE_EQUAL(IASSearchPaths));
90 inline bool operator!=(const MCTargetOptions &LHS, const MCTargetOptions &RHS) {
94 } // end namespace llvm