]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/include/llvm/MC/MCTargetOptions.h
Merge llvm, clang, lld, lldb, compiler-rt and libc++ r301441, and update
[FreeBSD/FreeBSD.git] / contrib / llvm / 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 #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
28 class MCTargetOptions {
29 public:
30   enum AsmInstrumentation {
31     AsmInstrumentationNone,
32     AsmInstrumentationAddress
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;
42   bool MCNoDeprecatedWarn : 1;
43   bool MCSaveTempLabels : 1;
44   bool MCUseDwarfDirectory : 1;
45   bool MCIncrementalLinkerCompatible : 1;
46   bool MCPIECopyRelocations : 1;
47   bool ShowMCEncoding : 1;
48   bool ShowMCInst : 1;
49   bool AsmVerbose : 1;
50
51   /// Preserve Comments in Assembly.
52   bool PreserveAsmComments : 1;
53
54   int DwarfVersion = 0;
55
56   std::string ABIName;
57   std::string SplitDwarfFile;
58
59   /// Additional paths to search for `.include` directives when using the
60   /// integrated assembler.
61   std::vector<std::string> IASSearchPaths;
62
63   MCTargetOptions();
64
65   /// getABIName - If this returns a non-empty string this represents the
66   /// textual name of the ABI that we want the backend to use, e.g. o32, or
67   /// aapcs-linux.
68   StringRef getABIName() const;
69 };
70
71 } // end namespace llvm
72
73 #endif // LLVM_MC_MCTARGETOPTIONS_H