[llvm-commits] CVS: llvm/tools/opt/opt.cpp
Nick Lewycky
nicholas at mxc.ca
Thu Nov 30 16:43:29 PST 2006
Changes in directory llvm/tools/opt:
opt.cpp updated: 1.121 -> 1.122
---
Log message:
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!
---
Diffs of the changes: (+3 -4)
opt.cpp | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
Index: llvm/tools/opt/opt.cpp
diff -u llvm/tools/opt/opt.cpp:1.121 llvm/tools/opt/opt.cpp:1.122
--- llvm/tools/opt/opt.cpp:1.121 Tue Nov 28 18:19:40 2006
+++ llvm/tools/opt/opt.cpp Thu Nov 30 18:43:14 2006
@@ -252,10 +252,9 @@
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());
More information about the llvm-commits
mailing list