LLVM  16.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"
14 #include <string>
15 #include <vector>
16 
17 namespace llvm {
18 
19 enum class ExceptionHandling {
20  None, ///< No exception support
21  DwarfCFI, ///< DWARF-like instruction based exceptions
22  SjLj, ///< setjmp/longjmp based exceptions
23  ARM, ///< ARM EHABI
24  WinEH, ///< Windows Exception Handling
25  Wasm, ///< WebAssembly Exception Handling
26  AIX, ///< AIX Exception Handling
27 };
28 
29 enum class EmitDwarfUnwindType {
30  Always, // Always emit dwarf unwind
31  NoCompactUnwind, // Only emit if compact unwind isn't available
32  Default, // Default behavior is based on the target
33 };
34 
35 class StringRef;
36 
38 public:
42  };
43 
44  bool MCRelaxAll : 1;
45  bool MCNoExecStack : 1;
46  bool MCFatalWarnings : 1;
47  bool MCNoWarn : 1;
49  bool MCNoTypeCheck : 1;
50  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 
62 
63  int DwarfVersion = 0;
64 
66  // Force disable
68  // Force enable, for assemblers that support
69  // `.file fileno directory filename' syntax
71  // Default is based on the target
73  };
75 
76  std::string ABIName;
77  std::string AssemblyLanguage;
78  std::string SplitDwarfFile;
79 
80  const char *Argv0 = nullptr;
82 
83  /// Additional paths to search for `.include` directives when using the
84  /// integrated assembler.
85  std::vector<std::string> IASSearchPaths;
86 
88 
89  /// getABIName - If this returns a non-empty string this represents the
90  /// textual name of the ABI that we want the backend to use, e.g. o32, or
91  /// aapcs-linux.
92  StringRef getABIName() const;
93 
94  /// getAssemblyLanguage - If this returns a non-empty string this represents
95  /// the textual name of the assembly language that we will use for this
96  /// target, e.g. masm.
98 };
99 
100 } // end namespace llvm
101 
102 #endif // LLVM_MC_MCTARGETOPTIONS_H
llvm::MCTargetOptions::DwarfVersion
int DwarfVersion
Definition: MCTargetOptions.h:63
Compression.h
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
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:23
llvm::MCTargetOptions::IASSearchPaths
std::vector< std::string > IASSearchPaths
Additional paths to search for .include directives when using the integrated assembler.
Definition: MCTargetOptions.h:85
llvm::MCTargetOptions::AsmInstrumentationNone
@ AsmInstrumentationNone
Definition: MCTargetOptions.h:40
llvm::MCTargetOptions::Argv0
const char * Argv0
Definition: MCTargetOptions.h:80
llvm::EmitDwarfUnwindType::NoCompactUnwind
@ NoCompactUnwind
llvm::ExceptionHandling::ARM
@ ARM
ARM EHABI.
llvm::MCTargetOptions::ABIName
std::string ABIName
Definition: MCTargetOptions.h:76
llvm::EmitDwarfUnwindType
EmitDwarfUnwindType
Definition: MCTargetOptions.h:29
llvm::MCTargetOptions::CommandLineArgs
ArrayRef< std::string > CommandLineArgs
Definition: MCTargetOptions.h:81
llvm::ExceptionHandling::AIX
@ AIX
AIX Exception Handling.
llvm::EmitDwarfUnwindType::Default
@ Default
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:27
llvm::MCTargetOptions::ShowMCEncoding
bool ShowMCEncoding
Definition: MCTargetOptions.h:52
llvm::ExceptionHandling
ExceptionHandling
Definition: MCTargetOptions.h:19
llvm::MCTargetOptions::SplitDwarfFile
std::string SplitDwarfFile
Definition: MCTargetOptions.h:78
llvm::MCTargetOptions::AsmInstrumentation
AsmInstrumentation
Definition: MCTargetOptions.h:39
llvm::MCTargetOptions::MCUseDwarfDirectory
DwarfDirectory MCUseDwarfDirectory
Definition: MCTargetOptions.h:74
llvm::ExceptionHandling::Wasm
@ Wasm
WebAssembly Exception Handling.
llvm::MCTargetOptions::EmitDwarfUnwind
EmitDwarfUnwindType EmitDwarfUnwind
Definition: MCTargetOptions.h:61
llvm::MCTargetOptions::MCIncrementalLinkerCompatible
bool MCIncrementalLinkerCompatible
Definition: MCTargetOptions.h:51
llvm::MCTargetOptions::MCNoDeprecatedWarn
bool MCNoDeprecatedWarn
Definition: MCTargetOptions.h:48
llvm::MCTargetOptions::DwarfDirectory
DwarfDirectory
Definition: MCTargetOptions.h:65
ArrayRef.h
llvm::MCTargetOptions::AsmInstrumentationAddress
@ AsmInstrumentationAddress
Definition: MCTargetOptions.h:41
llvm::MCTargetOptions::EnableDwarfDirectory
@ EnableDwarfDirectory
Definition: MCTargetOptions.h:70
llvm::MCTargetOptions
Definition: MCTargetOptions.h:37
llvm::MCTargetOptions::Dwarf64
bool Dwarf64
Definition: MCTargetOptions.h:59
llvm::ArrayRef< std::string >
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
llvm::MCTargetOptions::ShowMCInst
bool ShowMCInst
Definition: MCTargetOptions.h:53
llvm::MCTargetOptions::DefaultDwarfDirectory
@ DefaultDwarfDirectory
Definition: MCTargetOptions.h:72
llvm::MCTargetOptions::DisableDwarfDirectory
@ DisableDwarfDirectory
Definition: MCTargetOptions.h:67
llvm::ExceptionHandling::WinEH
@ WinEH
Windows Exception Handling.
llvm::MCTargetOptions::MCRelaxAll
bool MCRelaxAll
Definition: MCTargetOptions.h:44
llvm::MCTargetOptions::AsmVerbose
bool AsmVerbose
Definition: MCTargetOptions.h:54
llvm::ExceptionHandling::None
@ None
No exception support.
llvm::MCTargetOptions::MCSaveTempLabels
bool MCSaveTempLabels
Definition: MCTargetOptions.h:50
llvm::MCTargetOptions::MCNoExecStack
bool MCNoExecStack
Definition: MCTargetOptions.h:45
llvm::MCTargetOptions::AssemblyLanguage
std::string AssemblyLanguage
Definition: MCTargetOptions.h:77
llvm::MCTargetOptions::PreserveAsmComments
bool PreserveAsmComments
Preserve Comments in Assembly.
Definition: MCTargetOptions.h:57
llvm::MCTargetOptions::MCNoWarn
bool MCNoWarn
Definition: MCTargetOptions.h:47
llvm::EmitDwarfUnwindType::Always
@ Always
llvm::MCTargetOptions::MCFatalWarnings
bool MCFatalWarnings
Definition: MCTargetOptions.h:46
llvm::MCTargetOptions::MCNoTypeCheck
bool MCNoTypeCheck
Definition: MCTargetOptions.h:49
llvm::ExceptionHandling::DwarfCFI
@ DwarfCFI
DWARF-like instruction based exceptions.