diff options
author | Chris Lattner <sabre@nondot.org> | 2005-03-06 05:13:42 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-03-06 05:13:42 +0000 |
commit | ee4da939b0ee2615a4b32f67e4bed4b566decc53 (patch) | |
tree | a4090e2a38309566ae9b34d864ede746e867fb94 /lib/VMCore/SymbolTable.cpp | |
parent | 84ceb33f9230c6173c1b2ab116d2c1f3affac825 (diff) |
Simplify some code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20476 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/SymbolTable.cpp')
-rw-r--r-- | lib/VMCore/SymbolTable.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/VMCore/SymbolTable.cpp b/lib/VMCore/SymbolTable.cpp index db46607718..a4a0134f89 100644 --- a/lib/VMCore/SymbolTable.cpp +++ b/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(); |