summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-03-06 05:13:42 +0000
committerChris Lattner <sabre@nondot.org>2005-03-06 05:13:42 +0000
commitcd56f5a8e47414afad4232c9941584870daab52a (patch)
treea6d23c5fe46c0d8b8824a6083f2647283389372a /llvm/lib/VMCore
parent6be3b418e72cba9a85e30e509cf3f4a2fd834d86 (diff)
downloadbcm5719-llvm-cd56f5a8e47414afad4232c9941584870daab52a.tar.gz
bcm5719-llvm-cd56f5a8e47414afad4232c9941584870daab52a.zip
Simplify some code.
llvm-svn: 20476
Diffstat (limited to 'llvm/lib/VMCore')
-rw-r--r--llvm/lib/VMCore/SymbolTable.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/llvm/lib/VMCore/SymbolTable.cpp b/llvm/lib/VMCore/SymbolTable.cpp
index db46607718f..a4a0134f897 100644
--- a/llvm/lib/VMCore/SymbolTable.cpp
+++ b/llvm/lib/VMCore/SymbolTable.cpp
@@ -252,9 +252,8 @@ void SymbolTable::insertEntry(const std::string &Name, const Type *VTy,
std::string UniqueName = getUniqueName(VTy, Name);
assert(InternallyInconsistent == false &&
"Infinite loop inserting value!");
- InternallyInconsistent = true;
- V->setName(UniqueName);
- InternallyInconsistent = false;
+ V->Name = UniqueName;
+ VM->insert(VI, make_pair(UniqueName, V));
return;
}
}
@@ -382,11 +381,10 @@ void SymbolTable::refineAbstractType(const DerivedType *OldType,
//
assert(InternallyInconsistent == false &&
"Symbol table already inconsistent!");
- InternallyInconsistent = true;
- // Remove newM from the symtab
- NewGV->setName("");
- InternallyInconsistent = false;
+ // Update NewGV's name, we're about the remove it from the symbol
+ // table.
+ NewGV->Name = "";
// Now we can remove this global from the module entirely...
Module *M = NewGV->getParent();
OpenPOWER on IntegriCloud