LLVM 23.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"
16#include <string>
17#include <vector>
18
19namespace llvm {
20
22 Always, // Always emit dwarf unwind
23 NoCompactUnwind, // Only emit if compact unwind isn't available
24 DwarfOnly, // Force compact unwind to reference DWARF
25 Default, // Default behavior is based on the target
26};
27
28// For ELF targets, whether to adjust relocations referencing eligible local
29// symbols to use section symbols.
31 All, // For all eligible local symbols (default)
32 Internal, // For .L symbols
33 None, // Never use section symbols
34};
35
36class StringRef;
37
39public:
44
45 bool MCRelaxAll : 1;
46 bool MCNoExecStack : 1;
48 bool MCNoWarn : 1;
50 bool MCNoTypeCheck : 1;
53 bool FDPIC : 1;
55 bool ShowMCInst : 1;
56 bool AsmVerbose : 1;
57
58 /// Preserve Comments in Assembly.
60
61 bool Dwarf64 : 1;
62
63 // Use CREL relocation format for ELF.
64 bool Crel = false;
65
66 bool ImplicitMapSyms = false;
67
68 // If true, prefer R_X86_64_[REX_]GOTPCRELX to R_X86_64_GOTPCREL on x86-64
69 // ELF.
71
72 bool X86Sse2Avx = false;
73
74 // For ELF relocations, controls section symbol conversion.
76
77 std::optional<unsigned> OutputAsmVariant;
78
80
81 int DwarfVersion = 0;
82
84 // Force disable
86 // Force enable, for assemblers that support
87 // `.file fileno directory filename' syntax
89 // Default is based on the target
91 };
93
94 // Whether to compress DWARF debug sections.
96
97 std::string ABIName;
98 std::string AssemblyLanguage;
99 std::string SplitDwarfFile;
100 std::string AsSecureLogFile;
101
102 // Used for codeview debug info. These will be set as compiler path and commandline arguments in LF_BUILDINFO
103 std::string Argv0;
104 std::string CommandlineArgs;
105
106 /// Additional paths to search for `.include` directives when using the
107 /// integrated assembler.
108 std::vector<std::string> IASSearchPaths;
109
110 // InstPrinter options.
111 std::vector<std::string> InstPrinterOptions;
112
113 // Whether to emit compact-unwind for non-canonical personality
114 // functions on Darwins.
116
117 // Whether to emit SFrame unwind sections.
119
120 // Whether or not to use full register names on PowerPC.
122
124
125 /// getABIName - If this returns a non-empty string this represents the
126 /// textual name of the ABI that we want the backend to use, e.g. o32, or
127 /// aapcs-linux.
129
130 /// getAssemblyLanguage - If this returns a non-empty string this represents
131 /// the textual name of the assembly language that we will use for this
132 /// target, e.g. masm.
134};
135
136} // end namespace llvm
137
138#endif // LLVM_MC_MCTARGETOPTIONS_H
#define LLVM_ABI
Definition Compiler.h:213
bool PreserveAsmComments
Preserve Comments in Assembly.
DwarfDirectory MCUseDwarfDirectory
EmitDwarfUnwindType EmitDwarfUnwind
std::vector< std::string > InstPrinterOptions
RelocSectionSymType RelocSectionSym
std::optional< unsigned > OutputAsmVariant
DebugCompressionType CompressDebugSections
std::vector< std::string > IASSearchPaths
Additional paths to search for .include directives when using the integrated assembler.
LLVM_ABI StringRef getAssemblyLanguage() const
getAssemblyLanguage - If this returns a non-empty string this represents the textual name of the asse...
LLVM_ABI StringRef getABIName() const
getABIName - If this returns a non-empty string this represents the textual name of the ABI that we w...
Represent a constant reference to a string, i.e.
Definition StringRef.h:56
This is an optimization pass for GlobalISel generic memory operations.
RelocSectionSymType
EmitDwarfUnwindType
DebugCompressionType
Definition Compression.h:28
@ None
No compression.
Definition Compression.h:29
@ Always
Always emit .debug_str_offsets talbes as DWARF64 for testing.
Definition DWP.h:32
@ Default
The result value is uniform if and only if all operands are uniform.
Definition Uniformity.h:20