diff options
author | Chris Lattner <sabre@nondot.org> | 2003-11-19 01:02:52 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-11-19 01:02:52 +0000 |
commit | 7dadaa27859167c2a6ae5ebd09a7bc27f0e0dc92 (patch) | |
tree | ac9bc5824ae3312bb92d2db2cdba78bc4ae5df7d /lib/VMCore/SymbolTable.cpp | |
parent | df52d97b57e04c23284924c50c6ff728f2a1e982 (diff) | |
download | llvm-7dadaa27859167c2a6ae5ebd09a7bc27f0e0dc92.tar.gz llvm-7dadaa27859167c2a6ae5ebd09a7bc27f0e0dc92.tar.bz2 llvm-7dadaa27859167c2a6ae5ebd09a7bc27f0e0dc92.tar.xz |
Fix PR130, and testcase test/Regression/Linker/2003-11-18-TypeResolution.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10075 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/SymbolTable.cpp')
-rw-r--r-- | lib/VMCore/SymbolTable.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/VMCore/SymbolTable.cpp b/lib/VMCore/SymbolTable.cpp index 834d619898..f2e5398d41 100644 --- a/lib/VMCore/SymbolTable.cpp +++ b/lib/VMCore/SymbolTable.cpp @@ -271,6 +271,13 @@ void SymbolTable::refineAbstractType(const DerivedType *OldType, else M->getGlobalList().remove(cast<GlobalVariable>(NewGV)); delete NewGV; + } else { + // If they are not global values, they must be just random values who + // happen to conflict now that types have been resolved. If this is + // the case, reinsert the value into the new plane, allowing it to get + // renamed. + assert(V.second->getType() == NewType &&"Type resolution is broken!"); + insert(V.second); } } else { insertEntry(V.first, NewType, V.second); |