aboutsummaryrefslogtreecommitdiff
path: root/tools/lto
diff options
context:
space:
mode:
Diffstat (limited to 'tools/lto')
-rw-r--r--tools/lto/LTOCodeGenerator.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/tools/lto/LTOCodeGenerator.cpp b/tools/lto/LTOCodeGenerator.cpp
index 7e873abb13..0a58aa7e89 100644
--- a/tools/lto/LTOCodeGenerator.cpp
+++ b/tools/lto/LTOCodeGenerator.cpp
@@ -393,14 +393,11 @@ bool LTOCodeGenerator::generateAssemblyCode(formatted_raw_ostream& out,
codeGenPasses->add(new TargetData(*_target->getTargetData()));
- switch (_target->addPassesToEmitFile(*codeGenPasses, out,
- TargetMachine::CGFT_AssemblyFile,
- CodeGenOpt::Aggressive)) {
- case TargetMachine::CGFT_AssemblyFile:
- break;
- default:
- errMsg = "target file type not supported";
- return true;
+ if (_target->addPassesToEmitFile(*codeGenPasses, out,
+ TargetMachine::CGFT_AssemblyFile,
+ CodeGenOpt::Aggressive)) {
+ errMsg = "target file type not supported";
+ return true;
}
// Run our queue of passes all at once now, efficiently.