-analyze mode shouldn't output a .bc file.
authorChris Lattner <sabre@nondot.org>
Sun, 27 Aug 2006 22:40:26 +0000 (22:40 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 27 Aug 2006 22:40:26 +0000 (22:40 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29923 91177308-0d34-0410-b5e6-96231b3b80d8

tools/opt/opt.cpp

index 4394c98917a50f07f7516222cc45117ca2a14b98..5c61549d75eb57c9b3bddcaec6d402fe870e8047 100644 (file)
@@ -30,7 +30,6 @@
 #include <fstream>
 #include <memory>
 #include <algorithm>
-
 using namespace llvm;
 
 // The OptimizationList is automatically populated with registered Passes by the
@@ -250,7 +249,7 @@ int main(int argc, char **argv) {
       Passes.add(createVerifierPass());
 
     // Write bytecode out to disk or cout as the last step...
-    if (!NoOutput)
+    if (!NoOutput && !AnalyzeOnly)
       Passes.add(new WriteBytecodePass(Out, Out != &std::cout));
 
     // Now that we have all of the passes ready, run them.