LLVM 20.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
17namespace llvm {
18
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 ZOS, ///< z/OS MVS Exception Handling. Very similar to DwarfCFI, but the PPA1
28 ///< is used instead of an .eh_frame section.
29};
30
32 Always, // Always emit dwarf unwind
33 NoCompactUnwind, // Only emit if compact unwind isn't available
34 Default, // Default behavior is based on the target
35};
36
37class StringRef;
38
40public:
44 };
45
46 bool MCRelaxAll : 1;
47 bool MCNoExecStack : 1;
49 bool MCNoWarn : 1;
51 bool MCNoTypeCheck : 1;
54 bool FDPIC : 1;
56 bool ShowMCInst : 1;
57 bool AsmVerbose : 1;
58
59 /// Preserve Comments in Assembly.
61
62 bool Dwarf64 : 1;
63
64 // Use CREL relocation format for ELF.
65 bool Crel = false;
66
67 bool ImplicitMapSyms = false;
68
69 // If true, prefer R_X86_64_[REX_]GOTPCRELX to R_X86_64_GOTPCREL on x86-64
70 // ELF.
72
73 bool X86Sse2Avx = false;
74
75 std::optional<unsigned> OutputAsmVariant;
76
78
79 int DwarfVersion = 0;
80
82 // Force disable
84 // Force enable, for assemblers that support
85 // `.file fileno directory filename' syntax
87 // Default is based on the target
89 };
91
92 // Whether to compress DWARF debug sections.
94
95 std::string ABIName;
96 std::string AssemblyLanguage;
97 std::string SplitDwarfFile;
98 std::string AsSecureLogFile;
99
100 // Used for codeview debug info. These will be set as compiler path and commandline arguments in LF_BUILDINFO
101 std::string Argv0;
102 std::string CommandlineArgs;
103
104 /// Additional paths to search for `.include` directives when using the
105 /// integrated assembler.
106 std::vector<std::string> IASSearchPaths;
107
108 // Whether to emit compact-unwind for non-canonical personality
109 // functions on Darwins.
111
112 // Whether or not to use full register names on PowerPC.
114
116
117 /// getABIName - If this returns a non-empty string this represents the
118 /// textual name of the ABI that we want the backend to use, e.g. o32, or
119 /// aapcs-linux.
120 StringRef getABIName() const;
121
122 /// getAssemblyLanguage - If this returns a non-empty string this represents
123 /// the textual name of the assembly language that we will use for this
124 /// target, e.g. masm.
126};
127
128} // end namespace llvm
129
130#endif // LLVM_MC_MCTARGETOPTIONS_H
bool PreserveAsmComments
Preserve Comments in Assembly.
std::string AsSecureLogFile
DwarfDirectory MCUseDwarfDirectory
EmitDwarfUnwindType EmitDwarfUnwind
std::optional< unsigned > OutputAsmVariant
DebugCompressionType CompressDebugSections
std::vector< std::string > IASSearchPaths
Additional paths to search for .include directives when using the integrated assembler.
StringRef getAssemblyLanguage() const
getAssemblyLanguage - If this returns a non-empty string this represents the textual name of the asse...
StringRef getABIName() const
getABIName - If this returns a non-empty string this represents the textual name of the ABI that we w...
std::string SplitDwarfFile
std::string AssemblyLanguage
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:51
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
ExceptionHandling
@ SjLj
setjmp/longjmp based exceptions
@ ZOS
z/OS MVS Exception Handling.
@ AIX
AIX Exception Handling.
@ DwarfCFI
DWARF-like instruction based exceptions.
@ WinEH
Windows Exception Handling.
@ Wasm
WebAssembly Exception Handling.
@ None
Definition: CodeGenData.h:106
EmitDwarfUnwindType
DebugCompressionType
Definition: Compression.h:27
@ Default
The result values are uniform if and only if all operands are uniform.