LLVM  14.0.0git
MCTargetOptions.h
Go to the documentation of this file.
1 //===- MCTargetOptions.h - MC Target Options --------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLVM_MC_MCTARGETOPTIONS_H
10 #define LLVM_MC_MCTARGETOPTIONS_H
11 
12 #include "llvm/ADT/ArrayRef.h"
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  Wasm, ///< WebAssembly Exception Handling
25  AIX, ///< AIX Exception Handling
26 };
27 
29  None, ///< No compression
30  GNU, ///< zlib-gnu style compression
31  Z, ///< zlib style complession
32 };
33 
34 class StringRef;
35 
37 public:
41  };
42 
43  bool MCRelaxAll : 1;
44  bool MCNoExecStack : 1;
45  bool MCFatalWarnings : 1;
46  bool MCNoWarn : 1;
48  bool MCNoTypeCheck : 1;
49  bool MCSaveTempLabels : 1;
52  bool ShowMCEncoding : 1;
53  bool ShowMCInst : 1;
54  bool AsmVerbose : 1;
55 
56  /// Preserve Comments in Assembly.
58 
59  bool Dwarf64 : 1;
60  int DwarfVersion = 0;
61 
62  std::string ABIName;
63  std::string AssemblyLanguage;
64  std::string SplitDwarfFile;
65 
66  const char *Argv0 = nullptr;
68 
69  /// Additional paths to search for `.include` directives when using the
70  /// integrated assembler.
71  std::vector<std::string> IASSearchPaths;
72 
74 
75  /// getABIName - If this returns a non-empty string this represents the
76  /// textual name of the ABI that we want the backend to use, e.g. o32, or
77  /// aapcs-linux.
78  StringRef getABIName() const;
79 
80  /// getAssemblyLanguage - If this returns a non-empty string this represents
81  /// the textual name of the assembly language that we will use for this
82  /// target, e.g. masm.
84 };
85 
86 } // end namespace llvm
87 
88 #endif // LLVM_MC_MCTARGETOPTIONS_H
llvm::MCTargetOptions::DwarfVersion
int DwarfVersion
Definition: MCTargetOptions.h:60
llvm
This file implements support for optimizing divisions by a constant.
Definition: AllocatorList.h:23
llvm::ExceptionHandling::SjLj
@ SjLj
setjmp/longjmp based exceptions
llvm::MCTargetOptions::MCTargetOptions
MCTargetOptions()
Definition: MCTargetOptions.cpp:14
llvm::MCTargetOptions::getABIName
StringRef getABIName() const
getABIName - If this returns a non-empty string this represents the textual name of the ABI that we w...
Definition: MCTargetOptions.cpp:22
llvm::MCTargetOptions::IASSearchPaths
std::vector< std::string > IASSearchPaths
Additional paths to search for .include directives when using the integrated assembler.
Definition: MCTargetOptions.h:71
llvm::MCTargetOptions::AsmInstrumentationNone
@ AsmInstrumentationNone
Definition: MCTargetOptions.h:39
llvm::MCTargetOptions::Argv0
const char * Argv0
Definition: MCTargetOptions.h:66
llvm::ExceptionHandling::ARM
@ ARM
ARM EHABI.
llvm::MCTargetOptions::ABIName
std::string ABIName
Definition: MCTargetOptions.h:62
llvm::ExceptionHandling::AIX
@ AIX
AIX Exception Handling.
llvm::MCTargetOptions::CommandLineArgs
ArrayRef< const char * > CommandLineArgs
Definition: MCTargetOptions.h:67
llvm::DebugCompressionType::Z
@ Z
zlib style complession
llvm::MCTargetOptions::getAssemblyLanguage
StringRef getAssemblyLanguage() const
getAssemblyLanguage - If this returns a non-empty string this represents the textual name of the asse...
Definition: MCTargetOptions.cpp:26
llvm::MCTargetOptions::ShowMCEncoding
bool ShowMCEncoding
Definition: MCTargetOptions.h:52
llvm::DebugCompressionType::None
@ None
No compression.
llvm::ExceptionHandling
ExceptionHandling
Definition: MCTargetOptions.h:18
llvm::MCTargetOptions::SplitDwarfFile
std::string SplitDwarfFile
Definition: MCTargetOptions.h:64
llvm::MCTargetOptions::AsmInstrumentation
AsmInstrumentation
Definition: MCTargetOptions.h:38
llvm::ExceptionHandling::Wasm
@ Wasm
WebAssembly Exception Handling.
llvm::MCTargetOptions::MCIncrementalLinkerCompatible
bool MCIncrementalLinkerCompatible
Definition: MCTargetOptions.h:51
llvm::MCTargetOptions::MCUseDwarfDirectory
bool MCUseDwarfDirectory
Definition: MCTargetOptions.h:50
llvm::MCTargetOptions::MCNoDeprecatedWarn
bool MCNoDeprecatedWarn
Definition: MCTargetOptions.h:47
ArrayRef.h
llvm::MCTargetOptions::AsmInstrumentationAddress
@ AsmInstrumentationAddress
Definition: MCTargetOptions.h:40
llvm::MCTargetOptions
Definition: MCTargetOptions.h:36
llvm::MCTargetOptions::Dwarf64
bool Dwarf64
Definition: MCTargetOptions.h:59
llvm::ArrayRef< const char * >
llvm::DebugCompressionType
DebugCompressionType
Definition: MCTargetOptions.h:28
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:58
llvm::DebugCompressionType::GNU
@ GNU
zlib-gnu style compression
llvm::MCTargetOptions::ShowMCInst
bool ShowMCInst
Definition: MCTargetOptions.h:53
llvm::ExceptionHandling::WinEH
@ WinEH
Windows Exception Handling.
llvm::MCTargetOptions::MCRelaxAll
bool MCRelaxAll
Definition: MCTargetOptions.h:43
llvm::MCTargetOptions::AsmVerbose
bool AsmVerbose
Definition: MCTargetOptions.h:54
llvm::ExceptionHandling::None
@ None
No exception support.
llvm::MCTargetOptions::MCSaveTempLabels
bool MCSaveTempLabels
Definition: MCTargetOptions.h:49
llvm::MCTargetOptions::MCNoExecStack
bool MCNoExecStack
Definition: MCTargetOptions.h:44
llvm::MCTargetOptions::AssemblyLanguage
std::string AssemblyLanguage
Definition: MCTargetOptions.h:63
llvm::MCTargetOptions::PreserveAsmComments
bool PreserveAsmComments
Preserve Comments in Assembly.
Definition: MCTargetOptions.h:57
llvm::MCTargetOptions::MCNoWarn
bool MCNoWarn
Definition: MCTargetOptions.h:46
llvm::MCTargetOptions::MCFatalWarnings
bool MCFatalWarnings
Definition: MCTargetOptions.h:45
llvm::MCTargetOptions::MCNoTypeCheck
bool MCNoTypeCheck
Definition: MCTargetOptions.h:48
llvm::ExceptionHandling::DwarfCFI
@ DwarfCFI
DWARF-like instruction based exceptions.