aboutsummaryrefslogtreecommitdiff
path: root/tools/lto
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-02-03 05:55:08 +0000
committerChris Lattner <sabre@nondot.org>2010-02-03 05:55:08 +0000
commit5669e3009761dff20b67e18a382c334041887928 (patch)
tree1627a6f9aa094e2aba6b96e3e258b7e47de42a14 /tools/lto
parentfebc81680c80a53f15f85b1812cba07fc179b9fd (diff)
change addPassesToEmitFile to return true on failure instead of its input,
add -filetype=null for performance testing and remove -filetype=dynlib, which isn't planned to be implemented. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95202 91177308-0d34-0410-b5e6-96231b3b80d8
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.