1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

Fix bug: Linker/2003-08-28-TypeResolvesGlobal2.ll

llvm-svn: 8206
This commit is contained in:
Chris Lattner 2003-08-29 05:11:34 +00:00
parent a2a7b891e5
commit 055944e9d3

View File

@ -236,17 +236,12 @@ void SymbolTable::refineAbstractType(const DerivedType *OldType,
"Two planes folded together with overlapping value names!");
// Make sure that ExistGV is the one we want to keep!
if (!NewGV->isExternal() || !NewGV->use_empty()) {
if (!NewGV->isExternal())
std::swap(NewGV, ExistGV);
}
// Ok we have two external global values. Make all uses of the new
// one use the old one...
//
assert(NewGV->use_empty() && "No uses allowed on untyped value!");
// We cannot replaceAllUsesWith, because they have different types!
//NewGV->replaceAllUsesWith(ExistGV);
NewGV->uncheckedReplaceAllUsesWith(ExistGV);
// Now we just convert it to an unnamed method... which won't get
// added to our symbol table. The problem is that if we call