Home | History | Annotate | Download | only in MC
      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 
     58   /// Additional paths to search for `.include` directives when using the
     59   /// integrated assembler.
     60   std::vector<std::string> IASSearchPaths;
     61 
     62   MCTargetOptions();
     63 
     64   /// getABIName - If this returns a non-empty string this represents the
     65   /// textual name of the ABI that we want the backend to use, e.g. o32, or
     66   /// aapcs-linux.
     67   StringRef getABIName() const;
     68 };
     69 
     70 } // end namespace llvm
     71 
     72 #endif // LLVM_MC_MCTARGETOPTIONS_H
     73