Deleting -emitbitcode option which did nothing.
authorGordon Henriksen <gordonhenriksen@mac.com>
Sun, 4 Nov 2007 20:28:31 +0000 (20:28 +0000)
committerGordon Henriksen <gordonhenriksen@mac.com>
Sun, 4 Nov 2007 20:28:31 +0000 (20:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43683 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Bitcode/Writer/BitcodeWriterPass.cpp

index 74123116da81be75d28aa55f26cfcb829a1d2c41..8de7ffb2db25ea151c99d3fcb96bad4f0678caa3 100644 (file)
@@ -17,22 +17,21 @@ using namespace llvm;
 
 namespace {
   class WriteBitcodePass : public ModulePass {
-    std::ostream *Out;                 // ostream to print on
+    std::ostream &Out;                 // ostream to print on
   public:
     static char ID; // Pass identifcation, replacement for typeid
-    WriteBitcodePass() : ModulePass((intptr_t) &ID), Out(0) { } 
-    WriteBitcodePass(std::ostream &o) : ModulePass((intptr_t) &ID), Out(&o) {}
+    WriteBitcodePass(std::ostream &o) : ModulePass((intptr_t) &ID), Out(o) {}
+    
+    const char *getPassName() const { return "Bitcode Writer"; }
     
     bool runOnModule(Module &M) {
-      if (Out)
-        WriteBitcodeToFile(&M, *Out);
+      WriteBitcodeToFile(&M, Out);
       return false;
     }
   };
 }
 
 char WriteBitcodePass::ID = 0;
-static RegisterPass<WriteBitcodePass> X("emitbitcode", "Bitcode Writer");
 
 /// CreateBitcodeWriterPass - Create and return a pass that writes the module
 /// to the specified ostream.