[llvm-commits] [llvm] r50433 - /llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp
Anton Korobeynikov
asl at math.spbu.ru
Tue Apr 29 11:16:22 PDT 2008
Author: asl
Date: Tue Apr 29 13:16:22 2008
New Revision: 50433
URL: http://llvm.org/viewvc/llvm-project?rev=50433&view=rev
Log:
Don't do stupid things: doInitialization(Module&) is not applicable to ModulePass :)
Modified:
llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp
Modified: llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp?rev=50433&r1=50432&r2=50433&view=diff
==============================================================================
--- llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp (original)
+++ llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp Tue Apr 29 13:16:22 2008
@@ -101,28 +101,13 @@
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 );
More information about the llvm-commits
mailing list