[llvm-commits] [dragonegg] r95219 - /dragonegg/trunk/llvm-backend.cpp
Duncan Sands
baldrick at free.fr
Wed Feb 3 02:31:52 PST 2010
Author: baldrick
Date: Wed Feb 3 04:31:52 2010
New Revision: 95219
URL: http://llvm.org/viewvc/llvm-project?rev=95219&view=rev
Log:
Port commit 95204 (lattner) from llvm-gcc:
update for llvm api change.
Modified:
dragonegg/trunk/llvm-backend.cpp
Modified: dragonegg/trunk/llvm-backend.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-backend.cpp?rev=95219&r1=95218&r2=95219&view=diff
==============================================================================
--- dragonegg/trunk/llvm-backend.cpp (original)
+++ dragonegg/trunk/llvm-backend.cpp Wed Feb 3 04:31:52 2010
@@ -671,14 +671,11 @@
// Normal mode, emit a .s file by running the code generator.
// Note, this also adds codegenerator level optimization passes.
InitializeOutputStreams(false);
- switch (TheTarget->addPassesToEmitFile(*PM, FormattedOutStream,
- TargetMachine::CGFT_AssemblyFile,
- OptLevel)) {
- default:
+ if (TheTarget->addPassesToEmitFile(*PM, FormattedOutStream,
+ TargetMachine::CGFT_AssemblyFile,
+ OptLevel)) {
errs() << "Error interfacing to target machine!\n";
exit(1);
- case TargetMachine::CGFT_AssemblyFile:
- break;
}
}
@@ -763,14 +760,11 @@
// Normal mode, emit a .s file by running the code generator.
// Note, this also adds codegenerator level optimization passes.
InitializeOutputStreams(false);
- switch (TheTarget->addPassesToEmitFile(*PM, FormattedOutStream,
- TargetMachine::CGFT_AssemblyFile,
- OptLevel)) {
- default:
+ if (TheTarget->addPassesToEmitFile(*PM, FormattedOutStream,
+ TargetMachine::CGFT_AssemblyFile,
+ OptLevel)) {
errs() << "Error interfacing to target machine!\n";
exit(1);
- case TargetMachine::CGFT_AssemblyFile:
- break;
}
}
}
More information about the llvm-commits
mailing list