summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-10-23 15:30:18 +0000
committerChris Lattner <sabre@nondot.org>2001-10-23 15:30:18 +0000
commitaeaec1ccb98c3dbae6bd7417eb0aa9a1ab42840e (patch)
treeeff95c2581c6ba7d92a9669ce900a494956dc916 /llvm/lib
parentadb4dbaef3dd1bb68fac060a22cfced636771940 (diff)
downloadbcm5719-llvm-aeaec1ccb98c3dbae6bd7417eb0aa9a1ab42840e.tar.gz
bcm5719-llvm-aeaec1ccb98c3dbae6bd7417eb0aa9a1ab42840e.zip
Remove unnamed prototypes that are created.
llvm-svn: 964
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/VMCore/SymbolTable.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/SymbolTable.cpp b/llvm/lib/VMCore/SymbolTable.cpp
index f84e945e7d6..7a6854c240a 100644
--- a/llvm/lib/VMCore/SymbolTable.cpp
+++ b/llvm/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!");
OpenPOWER on IntegriCloud