Fix a buggy conversion from bytecode to bitcode
authorChris Lattner <sabre@nondot.org>
Sun, 6 May 2007 19:43:09 +0000 (19:43 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 6 May 2007 19:43:09 +0000 (19:43 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36883 91177308-0d34-0410-b5e6-96231b3b80d8

tools/bugpoint/OptimizerDriver.cpp

index 5f031dc14ce479f6681f8dd71f37f0794cb440ee..047901fd9f6d587aa0cc10bba97517b2bc07b4ff 100644 (file)
@@ -57,7 +57,7 @@ bool BugDriver::writeProgramToFile(const std::string &Filename,
   std::ofstream Out(Filename.c_str(), io_mode);
   if (!Out.good()) return true;
   
-  WriteBitcodeToFile(M, Out);
+  WriteBitcodeToFile(M ? M : Program, Out);
   return false;
 }