summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2006-12-01 00:43:14 +0000
committerNick Lewycky <nicholas@mxc.ca>2006-12-01 00:43:14 +0000
commite5a861777856c1ddb04de7af93d8d195417e8ffe (patch)
treeefaf228be4a6d3176231f2ffff2008a702baa097 /llvm
parentd43999259b5649ee24fa742cb680a61bbc7c4e80 (diff)
downloadbcm5719-llvm-e5a861777856c1ddb04de7af93d8d195417e8ffe.tar.gz
bcm5719-llvm-e5a861777856c1ddb04de7af93d8d195417e8ffe.zip
Fix opt -o option. Don't pass a pointer to an auto variable which is going
away before it's needed, and don't try to delete that pointer! llvm-svn: 32055
Diffstat (limited to 'llvm')
-rw-r--r--llvm/tools/opt/opt.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/tools/opt/opt.cpp b/llvm/tools/opt/opt.cpp
index e43b76ff95f..c552d694fb3 100644
--- a/llvm/tools/opt/opt.cpp
+++ b/llvm/tools/opt/opt.cpp
@@ -252,10 +252,9 @@ int main(int argc, char **argv) {
Passes.add(createVerifierPass());
// Write bytecode out to disk or cout as the last step...
- if (!NoOutput && !AnalyzeOnly) {
- llvm_ostream L(*Out);
- Passes.add(new WriteBytecodePass(&L, Out != &std::cout, !NoCompress));
- }
+ llvm_ostream L(*Out);
+ if (!NoOutput && !AnalyzeOnly)
+ Passes.add(new WriteBytecodePass(&L, false, !NoCompress));
// Now that we have all of the passes ready, run them.
Passes.run(*M.get());
OpenPOWER on IntegriCloud