diff options
author | Chris Lattner <sabre@nondot.org> | 2001-10-18 17:07:22 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2001-10-18 17:07:22 +0000 |
commit | c9a1de6d1b1a6700c6bb5f169e48c9ab337ae876 (patch) | |
tree | e143bd16281bcf988adcb0f10ee6f14f3766164e | |
parent | 79a334968cfcaada7b476cf3fb16527b2800b33c (diff) | |
download | external_llvm-c9a1de6d1b1a6700c6bb5f169e48c9ab337ae876.zip external_llvm-c9a1de6d1b1a6700c6bb5f169e48c9ab337ae876.tar.gz external_llvm-c9a1de6d1b1a6700c6bb5f169e48c9ab337ae876.tar.bz2 |
Only output code if file open is successful
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@890 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | tools/llc/llc.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/tools/llc/llc.cpp b/tools/llc/llc.cpp index 358f95b..76364aa 100644 --- a/tools/llc/llc.cpp +++ b/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 |