File indexing completed on 2026-05-10 08:44:15
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef LLVM_MC_MCTARGETOPTIONS_H
0010 #define LLVM_MC_MCTARGETOPTIONS_H
0011
0012 #include "llvm/ADT/ArrayRef.h"
0013 #include "llvm/Support/Compression.h"
0014 #include <string>
0015 #include <vector>
0016
0017 namespace llvm {
0018
0019 enum class ExceptionHandling {
0020 None,
0021 DwarfCFI,
0022 SjLj,
0023 ARM,
0024 WinEH,
0025 Wasm,
0026 AIX,
0027 ZOS,
0028
0029 };
0030
0031 enum class EmitDwarfUnwindType {
0032 Always,
0033 NoCompactUnwind,
0034 Default,
0035 };
0036
0037 class StringRef;
0038
0039 class MCTargetOptions {
0040 public:
0041 enum AsmInstrumentation {
0042 AsmInstrumentationNone,
0043 AsmInstrumentationAddress
0044 };
0045
0046 bool MCRelaxAll : 1;
0047 bool MCNoExecStack : 1;
0048 bool MCFatalWarnings : 1;
0049 bool MCNoWarn : 1;
0050 bool MCNoDeprecatedWarn : 1;
0051 bool MCNoTypeCheck : 1;
0052 bool MCSaveTempLabels : 1;
0053 bool MCIncrementalLinkerCompatible : 1;
0054 bool FDPIC : 1;
0055 bool ShowMCEncoding : 1;
0056 bool ShowMCInst : 1;
0057 bool AsmVerbose : 1;
0058
0059
0060 bool PreserveAsmComments : 1;
0061
0062 bool Dwarf64 : 1;
0063
0064
0065 bool Crel = false;
0066
0067 bool ImplicitMapSyms = false;
0068
0069
0070
0071 bool X86RelaxRelocations = true;
0072
0073 bool X86Sse2Avx = false;
0074
0075 std::optional<unsigned> OutputAsmVariant;
0076
0077 EmitDwarfUnwindType EmitDwarfUnwind;
0078
0079 int DwarfVersion = 0;
0080
0081 enum DwarfDirectory {
0082
0083 DisableDwarfDirectory,
0084
0085
0086 EnableDwarfDirectory,
0087
0088 DefaultDwarfDirectory
0089 };
0090 DwarfDirectory MCUseDwarfDirectory;
0091
0092
0093 DebugCompressionType CompressDebugSections = DebugCompressionType::None;
0094
0095 std::string ABIName;
0096 std::string AssemblyLanguage;
0097 std::string SplitDwarfFile;
0098 std::string AsSecureLogFile;
0099
0100
0101 std::string Argv0;
0102 std::string CommandlineArgs;
0103
0104
0105
0106 std::vector<std::string> IASSearchPaths;
0107
0108
0109
0110 bool EmitCompactUnwindNonCanonical : 1;
0111
0112
0113 bool PPCUseFullRegisterNames : 1;
0114
0115 MCTargetOptions();
0116
0117
0118
0119
0120 StringRef getABIName() const;
0121
0122
0123
0124
0125 StringRef getAssemblyLanguage() const;
0126 };
0127
0128 }
0129
0130 #endif