Don't do stupid things: doInitialization(Module&) is not applicable to ModulePass :)

llvm-svn: 50433
This commit is contained in:
Anton Korobeynikov 2008-04-29 18:16:22 +00:00
parent d9e3b5c5bd
commit 0acc739817
1 changed files with 2 additions and 17 deletions

View File

@ -101,28 +101,13 @@ namespace {
public:
static char ID;
explicit CppWriter(std::ostream &o) : ModulePass((intptr_t)&ID), Out(o) {}
explicit CppWriter(std::ostream &o) :
ModulePass((intptr_t)&ID), Out(o), uniqueNum(0), is_inline(false) {}
virtual const char *getPassName() const { return "C++ backend"; }
bool runOnModule(Module &M);
bool doInitialization(Module &M) {
uniqueNum = 0;
is_inline = false;
TypeNames.clear();
ValueNames.clear();
UnresolvedTypes.clear();
TypeStack.clear();
UsedNames.clear();
DefinedTypes.clear();
DefinedValues.clear();
ForwardRefs.clear();
return false;
}
void printProgram(const std::string& fname, const std::string& modName );
void printModule(const std::string& fname, const std::string& modName );
void printContents(const std::string& fname, const std::string& modName );