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 Default, // Default behavior is based on the target
25};
26
27// For ELF targets, whether to adjust relocations referencing eligible local
28// symbols to use section symbols.
30 All, // For all eligible local symbols (default)
31 Internal, // For .L symbols
32 None, // Never use section symbols
33};
34
35class StringRef;
36
38public:
43
44 bool MCRelaxAll : 1;
45 bool MCNoExecStack : 1;
47 bool MCNoWarn : 1;
49 bool MCNoTypeCheck : 1;
52 bool FDPIC : 1;
54 bool ShowMCInst : 1;
55 bool AsmVerbose : 1;
56
57 /// Preserve Comments in Assembly.
59
60 bool Dwarf64 : 1;
61
62 // Use CREL relocation format for ELF.
63 bool Crel = false;
64
65 bool ImplicitMapSyms = false;
66
67 // If true, prefer R_X86_64_[REX_]GOTPCRELX to R_X86_64_GOTPCREL on x86-64
68 // ELF.
70
71 bool X86Sse2Avx = false;
72
73 // For ELF relocations, controls section symbol conversion.
75
76 std::optional<unsigned> OutputAsmVariant;
77
79
80 int DwarfVersion = 0;
81
83 // Force disable
85 // Force enable, for assemblers that support
86 // `.file fileno directory filename' syntax
88 // Default is based on the target
90 };
92
93 // Whether to compress DWARF debug sections.
95
96 std::string ABIName;
97 std::string AssemblyLanguage;
98 std::string SplitDwarfFile;
99 std::string AsSecureLogFile;
100
101 // Used for codeview debug info. These will be set as compiler path and commandline arguments in LF_BUILDINFO
102 std::string Argv0;
103 std::string CommandlineArgs;
104
105 /// Additional paths to search for `.include` directives when using the
106 /// integrated assembler.
107 std::vector<std::string> IASSearchPaths;
108
109 // InstPrinter options.
110 std::vector<std::string> InstPrinterOptions;
111
112 // Whether to emit compact-unwind for non-canonical personality
113 // functions on Darwins.
115
116 // Whether to emit SFrame unwind sections.
118
119 // Whether or not to use full register names on PowerPC.
121
123
124 /// getABIName - If this returns a non-empty string this represents the
125 /// textual name of the ABI that we want the backend to use, e.g. o32, or
126 /// aapcs-linux.
128
129 /// getAssemblyLanguage - If this returns a non-empty string this represents
130 /// the textual name of the assembly language that we will use for this
131 /// target, e.g. masm.
133};
134
135} // end namespace llvm
136
137#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...
StringRef - Represent a constant reference to a string, i.e.
Definition StringRef.h:55
This is an optimization pass for GlobalISel generic memory operations.
Definition Types.h:26
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:28
@ Default
The result values are uniform if and only if all operands are uniform.
Definition Uniformity.h:20