2nd arg to setName goes away.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20460 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2005-03-05 19:02:15 +00:00
parent ffdb920ec2
commit 8e1b8473eb

View File

@ -217,7 +217,7 @@ void SymbolTable::insertEntry(const std::string &Name, const Type *VTy,
assert(InternallyInconsistent == false && assert(InternallyInconsistent == false &&
"Infinite loop inserting value!"); "Infinite loop inserting value!");
InternallyInconsistent = true; InternallyInconsistent = true;
V->setName(UniqueName, this); V->setName(UniqueName);
InternallyInconsistent = false; InternallyInconsistent = false;
return; return;
} }
@ -298,7 +298,7 @@ std::string SymbolTable::get_name( const Type* T ) const {
// Strip the symbol table of its names. // Strip the symbol table of its names.
bool SymbolTable::strip( void ) { bool SymbolTable::strip() {
bool RemovedSymbol = false; bool RemovedSymbol = false;
for (plane_iterator I = pmap.begin(); I != pmap.end();) { for (plane_iterator I = pmap.begin(); I != pmap.end();) {
// Removing items from the plane can cause the plane itself to get deleted. // Removing items from the plane can cause the plane itself to get deleted.
@ -309,10 +309,7 @@ bool SymbolTable::strip( void ) {
Value *V = B->second; Value *V = B->second;
if (!isa<GlobalValue>(V) || cast<GlobalValue>(V)->hasInternalLinkage()) { if (!isa<GlobalValue>(V) || cast<GlobalValue>(V)->hasInternalLinkage()) {
// Set name to "", removing from symbol table! // Set name to "", removing from symbol table!
V->setName("", this); V->setName("");
RemovedSymbol = true;
} else if (isa<Constant>(V) ) {
remove(V);
RemovedSymbol = true; RemovedSymbol = true;
} }
++B; ++B;