diff options
author | Eric Christopher <echristo@gmail.com> | 2014-05-21 21:05:09 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2014-05-21 21:05:09 +0000 |
commit | d1b5bdaebdcdfc85854e6dac538bcc273b6a486a (patch) | |
tree | c02e41285e7b2c9f0f47589d3b16a28cbf1ff5c2 /tools/llc | |
parent | 9a3798632893c9fdec7e29afbdd98be6ef82a72a (diff) | |
download | llvm-d1b5bdaebdcdfc85854e6dac538bcc273b6a486a.tar.gz llvm-d1b5bdaebdcdfc85854e6dac538bcc273b6a486a.tar.bz2 llvm-d1b5bdaebdcdfc85854e6dac538bcc273b6a486a.tar.xz |
Move MCOptions that aren't shared between programs into their specific
program and have them initialize the MCOptions struct explicitly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209321 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llc')
-rw-r--r-- | tools/llc/llc.cpp | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/tools/llc/llc.cpp b/tools/llc/llc.cpp index 47be4a8b71..09ff4613b9 100644 --- a/tools/llc/llc.cpp +++ b/tools/llc/llc.cpp @@ -81,7 +81,18 @@ static cl::opt<bool> NoVerify("disable-verify", cl::Hidden, static cl::opt<bool> DisableSimplifyLibCalls("disable-simplify-libcalls", cl::desc("Disable simplify-libcalls")); -static int compileModule(char**, LLVMContext&); +static cl::opt<bool> ShowMCEncoding("show-mc-encoding", cl::Hidden, + cl::desc("Show encoding in .s output")); + +static cl::opt<bool> EnableDwarfDirectory( + "enable-dwarf-directory", cl::Hidden, + cl::desc("Use .file directives with an explicit directory.")); + +static cl::opt<bool> AsmVerbose("asm-verbose", + cl::desc("Add comments to directives."), + cl::init(true)); + +static int compileModule(char **, LLVMContext &); // GetFileNameRoot - Helper function to get the basename of a filename. static inline std::string @@ -270,10 +281,9 @@ static int compileModule(char **argv, LLVMContext &Context) { TargetOptions Options = InitTargetOptionsFromCodeGenFlags(); Options.DisableIntegratedAS = NoIntegratedAssembler; - - // Override default to generate verbose assembly unless we've seen the flag. - if (AsmVerbose.getNumOccurrences() == 0) - Options.MCOptions.AsmVerbose = true; + Options.MCOptions.ShowMCEncoding = ShowMCEncoding; + Options.MCOptions.MCUseDwarfDirectory = EnableDwarfDirectory; + Options.MCOptions.AsmVerbose = AsmVerbose; std::unique_ptr<TargetMachine> target( TheTarget->createTargetMachine(TheTriple.getTriple(), MCPU, FeaturesStr, |