summaryrefslogtreecommitdiffstats
path: root/llvm/tools
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-10-18 17:07:22 +0000
committerChris Lattner <sabre@nondot.org>2001-10-18 17:07:22 +0000
commit8c8b9d10c03cdd05274ea47aab3a0e5f0111ce31 (patch)
tree9ab0968623a60d562a40b584bb8216d956f2bd26 /llvm/tools
parentb2ac1e76b470458b88e7c5c085b4cb1f5443bd99 (diff)
downloadbcm5719-llvm-8c8b9d10c03cdd05274ea47aab3a0e5f0111ce31.tar.gz
bcm5719-llvm-8c8b9d10c03cdd05274ea47aab3a0e5f0111ce31.zip
Only output code if file open is successful
llvm-svn: 890
Diffstat (limited to 'llvm/tools')
-rw-r--r--llvm/tools/llc/llc.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/llvm/tools/llc/llc.cpp b/llvm/tools/llc/llc.cpp
index 358f95b43a8..76364aabc23 100644
--- a/llvm/tools/llc/llc.cpp
+++ b/llvm/tools/llc/llc.cpp
@@ -86,8 +86,6 @@ public:
virtual bool doPassFinalization(Module *M) {
- // TODO: This should be performed as a moduleCleanup function, but we don't
- // have one yet!
Target.emitAssembly(M, *Out);
if (DeleteStream) delete Out;
@@ -147,11 +145,11 @@ int main(int argc, char **argv) {
<< "! SKIPPING OUTPUT OF TRACE CODE\n";
delete os;
retCode = 1;
+ } else {
+ Passes.push_back(new PrintModulePass("", os,
+ /*deleteStream*/ true,
+ /*printAsBytecode*/ ! DebugTrace));
}
-
- Passes.push_back(new PrintModulePass("", os,
- /*deleteStream*/ true,
- /*printAsBytecode*/ ! DebugTrace));
}
// If LLVM dumping after transformations is requested, add it to the pipeline
OpenPOWER on IntegriCloud