diff options
author | Eric Christopher <echristo@gmail.com> | 2014-05-15 01:10:50 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2014-05-15 01:10:50 +0000 |
commit | 475ac5d302ba84ac13d34a9215c29c1a38ca5690 (patch) | |
tree | 04ad263f42a75a3c7990f052edc7fac9961025bf /include | |
parent | afc6099348a77ec9c9b81fe90824975dca9f2d75 (diff) | |
download | llvm-475ac5d302ba84ac13d34a9215c29c1a38ca5690.tar.gz llvm-475ac5d302ba84ac13d34a9215c29c1a38ca5690.tar.bz2 llvm-475ac5d302ba84ac13d34a9215c29c1a38ca5690.tar.xz |
Unify command line handling of MCTargetOptions and remove extra
options and code. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208833 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/CodeGen/CommandFlags.h | 8 | ||||
-rw-r--r-- | include/llvm/MC/MCTargetOptionsCommandFlags.h | 29 |
2 files changed, 22 insertions, 15 deletions
diff --git a/include/llvm/CodeGen/CommandFlags.h b/include/llvm/CodeGen/CommandFlags.h index 619826cf62..ac789e4af8 100644 --- a/include/llvm/CodeGen/CommandFlags.h +++ b/include/llvm/CodeGen/CommandFlags.h @@ -70,11 +70,6 @@ CMModel("code-model", "Large code model"), clEnumValEnd)); -cl::opt<bool> -RelaxAll("mc-relax-all", - cl::desc("When used with filetype=obj, " - "relax all fixups in the emitted object file")); - cl::opt<TargetMachine::CodeGenFileType> FileType("filetype", cl::init(TargetMachine::CGFT_AssemblyFile), cl::desc("Choose a file type (not all types are supported by all targets):"), @@ -87,9 +82,6 @@ FileType("filetype", cl::init(TargetMachine::CGFT_AssemblyFile), "Emit nothing, for performance testing"), clEnumValEnd)); -cl::opt<bool> EnableDwarfDirectory("enable-dwarf-directory", cl::Hidden, - cl::desc("Use .file directives with an explicit directory.")); - cl::opt<bool> DisableRedZone("disable-red-zone", cl::desc("Do not emit code that uses the red zone."), diff --git a/include/llvm/MC/MCTargetOptionsCommandFlags.h b/include/llvm/MC/MCTargetOptionsCommandFlags.h index b26fd944d8..0dddc2fdfb 100644 --- a/include/llvm/MC/MCTargetOptionsCommandFlags.h +++ b/include/llvm/MC/MCTargetOptionsCommandFlags.h @@ -20,22 +20,37 @@ using namespace llvm; cl::opt<MCTargetOptions::AsmInstrumentation> AsmInstrumentation( - "asm-instrumentation", - cl::desc("Instrumentation of inline assembly and " - "assembly source files"), + "asm-instrumentation", cl::desc("Instrumentation of inline assembly and " + "assembly source files"), cl::init(MCTargetOptions::AsmInstrumentationNone), - cl::values(clEnumValN(MCTargetOptions::AsmInstrumentationNone, - "none", + cl::values(clEnumValN(MCTargetOptions::AsmInstrumentationNone, "none", "no instrumentation at all"), - clEnumValN(MCTargetOptions::AsmInstrumentationAddress, - "address", + clEnumValN(MCTargetOptions::AsmInstrumentationAddress, "address", "instrument instructions with memory arguments"), clEnumValEnd)); +cl::opt<bool> RelaxAll("mc-relax-all", + cl::desc("When used with filetype=obj, " + "relax all fixups in the emitted object file")); + +cl::opt<bool> EnableDwarfDirectory( + "enable-dwarf-directory", cl::Hidden, + cl::desc("Use .file directives with an explicit directory.")); + +cl::opt<bool> NoExecStack("mc-no-exec-stack", + cl::desc("File doesn't need an exec stack")); + +static cl::opt<bool> +SaveTempLabels("L", cl::desc("Don't discard temporary labels")); + static inline MCTargetOptions InitMCTargetOptionsFromFlags() { MCTargetOptions Options; Options.SanitizeAddress = (AsmInstrumentation == MCTargetOptions::AsmInstrumentationAddress); + Options.MCRelaxAll = RelaxAll; + Options.MCUseDwarfDirectory = EnableDwarfDirectory; + Options.MCNoExecStack = NoExecStack; + Options.MCSaveTempLabels = SaveTempLabels; return Options; } |