LLVM 22.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
27class StringRef;
28
30public:
34 };
35
36 bool MCRelaxAll : 1;
37 bool MCNoExecStack : 1;
39 bool MCNoWarn : 1;
41 bool MCNoTypeCheck : 1;
44 bool FDPIC : 1;
46 bool ShowMCInst : 1;
47 bool AsmVerbose : 1;
48
49 /// Preserve Comments in Assembly.
51
52 bool Dwarf64 : 1;
53
54 // Use CREL relocation format for ELF.
55 bool Crel = false;
56
57 bool ImplicitMapSyms = false;
58
59 // If true, prefer R_X86_64_[REX_]GOTPCRELX to R_X86_64_GOTPCREL on x86-64
60 // ELF.
62
63 bool X86Sse2Avx = false;
64
65 std::optional<unsigned> OutputAsmVariant;
66
68
69 int DwarfVersion = 0;
70
72 // Force disable
74 // Force enable, for assemblers that support
75 // `.file fileno directory filename' syntax
77 // Default is based on the target
79 };
81
82 // Whether to compress DWARF debug sections.
84
85 std::string ABIName;
86 std::string AssemblyLanguage;
87 std::string SplitDwarfFile;
88 std::string AsSecureLogFile;
89
90 // Used for codeview debug info. These will be set as compiler path and commandline arguments in LF_BUILDINFO
91 std::string Argv0;
92 std::string CommandlineArgs;
93
94 /// Additional paths to search for `.include` directives when using the
95 /// integrated assembler.
96 std::vector<std::string> IASSearchPaths;
97
98 // InstPrinter options.
99 std::vector<std::string> InstPrinterOptions;
100
101 // Whether to emit compact-unwind for non-canonical personality
102 // functions on Darwins.
104
105 // Whether to emit SFrame unwind sections.
107
108 // Whether or not to use full register names on PowerPC.
110
112
113 /// getABIName - If this returns a non-empty string this represents the
114 /// textual name of the ABI that we want the backend to use, e.g. o32, or
115 /// aapcs-linux.
117
118 /// getAssemblyLanguage - If this returns a non-empty string this represents
119 /// the textual name of the assembly language that we will use for this
120 /// target, e.g. masm.
122};
123
124} // end namespace llvm
125
126#endif // LLVM_MC_MCTARGETOPTIONS_H
#define LLVM_ABI
Definition: Compiler.h:213
bool PreserveAsmComments
Preserve Comments in Assembly.
std::string AsSecureLogFile
DwarfDirectory MCUseDwarfDirectory
EmitDwarfUnwindType EmitDwarfUnwind
std::vector< std::string > InstPrinterOptions
std::string CommandlineArgs
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...
std::string SplitDwarfFile
std::string AssemblyLanguage
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: AddressRanges.h:18
EmitDwarfUnwindType
DebugCompressionType
Definition: Compression.h:28
@ Default
The result values are uniform if and only if all operands are uniform.