Remove unnamed prototypes that are created.
authorChris Lattner <sabre@nondot.org>
Tue, 23 Oct 2001 15:30:18 +0000 (15:30 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 23 Oct 2001 15:30:18 +0000 (15:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@964 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/SymbolTable.cpp

index f84e945e7d63ec56ebbcd0ba6daaa82deb72646b..7a6854c240a8afd34cb47a2b417fcd03f9418c46 100644 (file)
@@ -8,6 +8,7 @@
 #include "llvm/InstrTypes.h"
 #include "llvm/Support/StringExtras.h"
 #include "llvm/DerivedTypes.h"
+#include "llvm/Module.h"
 #include "llvm/Method.h"
 
 #define DEBUG_SYMBOL_TABLE 0
@@ -229,6 +230,11 @@ void SymbolTable::refineAbstractType(const DerivedType *OldType,
           // Remove newM from the symtab
           NewM->setName("");
           InternallyInconsistent = false;
+
+          // Now we can remove this method from the module entirely...
+          NewM->getParent()->getMethodList().remove(NewM);
+          delete NewM;
+
         } else {
           assert(0 && "Two ploanes folded together with overlapping "
                  "value names!");