Don't do stupid things: doInitialization(Module&) is not applicable to ModulePass :)
authorAnton Korobeynikov <asl@math.spbu.ru>
Tue, 29 Apr 2008 18:16:22 +0000 (18:16 +0000)
committerAnton Korobeynikov <asl@math.spbu.ru>
Tue, 29 Apr 2008 18:16:22 +0000 (18:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50433 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/CppBackend/CPPBackend.cpp

index bd06970ce4a6a240360b30307e25dd94bf78a9cb..b42001fa284a45ad58f5a23bceed1c0abf99d6a7 100644 (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 );