aboutsummaryrefslogtreecommitdiff
path: root/lib/Bitcode/Writer/BitcodeWriterPass.cpp
diff options
context:
space:
mode:
authorGordon Henriksen <gordonhenriksen@mac.com>2007-11-04 20:28:31 +0000
committerGordon Henriksen <gordonhenriksen@mac.com>2007-11-04 20:28:31 +0000
commitbd76d661942c27ee0fe67a7d103ff91192e7d92d (patch)
tree3a5bd67706cdaa5aa9b176368c2f33bd3fa4e1d5 /lib/Bitcode/Writer/BitcodeWriterPass.cpp
parent2e5d07e3ea5a64b8e65aa31c7ed8688bb4c71136 (diff)
Deleting -emitbitcode option which did nothing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43683 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode/Writer/BitcodeWriterPass.cpp')
-rw-r--r--lib/Bitcode/Writer/BitcodeWriterPass.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/Bitcode/Writer/BitcodeWriterPass.cpp b/lib/Bitcode/Writer/BitcodeWriterPass.cpp
index 74123116da..8de7ffb2db 100644
--- a/lib/Bitcode/Writer/BitcodeWriterPass.cpp
+++ b/lib/Bitcode/Writer/BitcodeWriterPass.cpp
@@ -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.