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 "llvm/Support/Compiler.h" 18 #include <optional> 19 #include <string> 20 21 namespace llvm { 22 23 class MCTargetOptions; 24 enum class EmitDwarfUnwindType; 25 26 namespace mc { 27 28 LLVM_ABI bool getRelaxAll(); 29 LLVM_ABI std::optional<bool> getExplicitRelaxAll(); 30 31 LLVM_ABI bool getIncrementalLinkerCompatible(); 32 33 LLVM_ABI bool getFDPIC(); 34 35 LLVM_ABI int getDwarfVersion(); 36 37 LLVM_ABI bool getDwarf64(); 38 39 LLVM_ABI EmitDwarfUnwindType getEmitDwarfUnwind(); 40 41 LLVM_ABI bool getEmitCompactUnwindNonCanonical(); 42 43 LLVM_ABI bool getShowMCInst(); 44 45 LLVM_ABI bool getFatalWarnings(); 46 47 LLVM_ABI bool getNoWarn(); 48 49 LLVM_ABI bool getNoDeprecatedWarn(); 50 51 LLVM_ABI bool getNoTypeCheck(); 52 53 LLVM_ABI bool getSaveTempLabels(); 54 55 LLVM_ABI bool getCrel(); 56 57 LLVM_ABI bool getImplicitMapSyms(); 58 59 LLVM_ABI bool getX86RelaxRelocations(); 60 61 LLVM_ABI bool getX86Sse2Avx(); 62 63 LLVM_ABI std::string getABIName(); 64 65 LLVM_ABI std::string getAsSecureLogFile(); 66 67 /// Create this object with static storage to register mc-related command 68 /// line options. 69 struct RegisterMCTargetOptionsFlags { 70 LLVM_ABI RegisterMCTargetOptionsFlags(); 71 }; 72 73 LLVM_ABI MCTargetOptions InitMCTargetOptionsFromFlags(); 74 75 } // namespace mc 76 77 } // namespace llvm 78 79 #endif 80