aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore/SymbolTable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/VMCore/SymbolTable.cpp')
-rw-r--r--lib/VMCore/SymbolTable.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/VMCore/SymbolTable.cpp b/lib/VMCore/SymbolTable.cpp
index 834d619..f2e5398 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);