diff options
author | Chris Lattner <sabre@nondot.org> | 2001-10-23 15:30:18 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2001-10-23 15:30:18 +0000 |
commit | 2172ca1babeabd32f3dd0d8eee915c1dcbe47354 (patch) | |
tree | 8fe62c798b87aa4a9c0d91b8d571eb25225f7992 | |
parent | 90ebc114c66871ce5b9b98253fe767ec9246bdfe (diff) |
Remove unnamed prototypes that are created.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@964 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/VMCore/SymbolTable.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/VMCore/SymbolTable.cpp b/lib/VMCore/SymbolTable.cpp index f84e945e7d..7a6854c240 100644 --- a/lib/VMCore/SymbolTable.cpp +++ b/lib/VMCore/SymbolTable.cpp @@ -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!"); |