From 4f6d26dbe89d51362b665fe8fb0f206434e52471 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Tue, 20 May 2014 23:59:50 +0000 Subject: Move the verbose asm option to be part of the options struct and set appropriately. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209258 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/llc/llc.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tools/llc') diff --git a/tools/llc/llc.cpp b/tools/llc/llc.cpp index 269a5df904..abdc1ab634 100644 --- a/tools/llc/llc.cpp +++ b/tools/llc/llc.cpp @@ -273,6 +273,10 @@ 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; + std::unique_ptr target( TheTarget->createTargetMachine(TheTriple.getTriple(), MCPU, FeaturesStr, Options, RelocModel, CMModel, OLvl)); @@ -309,9 +313,6 @@ static int compileModule(char **argv, LLVMContext &Context) { mod->setDataLayout(DL); PM.add(new DataLayoutPass(mod)); - // Override default to generate verbose assembly. - Target.setAsmVerbosityDefault(true); - if (RelaxAll.getNumOccurrences() > 0 && FileType != TargetMachine::CGFT_ObjectFile) errs() << argv[0] -- cgit v1.2.3