Remove unnamed prototypes that are created.

llvm-svn: 964
This commit is contained in:
Chris Lattner 2001-10-23 15:30:18 +00:00
parent adb4dbaef3
commit aeaec1ccb9
1 changed files with 6 additions and 0 deletions

View 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!");