xref: /llvm-project/llvm/include/llvm/MC/MCTargetOptionsCommandFlags.h (revision 46707b0a83b7769965f9b1b3d08b2cc6bd26c469)
1 //===-- MCTargetOptionsCommandFlags.h --------------------------*- 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 // This file contains machine code-specific flags that are shared between
10 // different command line tools.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_MC_MCTARGETOPTIONSCOMMANDFLAGS_H
15 #define LLVM_MC_MCTARGETOPTIONSCOMMANDFLAGS_H
16 
17 #include <optional>
18 #include <string>
19 
20 namespace llvm {
21 
22 class MCTargetOptions;
23 enum class EmitDwarfUnwindType;
24 
25 namespace mc {
26 
27 bool getRelaxAll();
28 std::optional<bool> getExplicitRelaxAll();
29 
30 bool getIncrementalLinkerCompatible();
31 
32 bool getFDPIC();
33 
34 int getDwarfVersion();
35 
36 bool getDwarf64();
37 
38 EmitDwarfUnwindType getEmitDwarfUnwind();
39 
40 bool getEmitCompactUnwindNonCanonical();
41 
42 bool getShowMCInst();
43 
44 bool getFatalWarnings();
45 
46 bool getNoWarn();
47 
48 bool getNoDeprecatedWarn();
49 
50 bool getNoTypeCheck();
51 
52 bool getSaveTempLabels();
53 
54 bool getCrel();
55 
56 bool getImplicitMapSyms();
57 
58 bool getX86RelaxRelocations();
59 
60 bool getX86Sse2Avx();
61 
62 std::string getABIName();
63 
64 std::string getAsSecureLogFile();
65 
66 /// Create this object with static storage to register mc-related command
67 /// line options.
68 struct RegisterMCTargetOptionsFlags {
69   RegisterMCTargetOptionsFlags();
70 };
71 
72 MCTargetOptions InitMCTargetOptionsFromFlags();
73 
74 } // namespace mc
75 
76 } // namespace llvm
77 
78 #endif
79