diff options
author | Chris Lattner <sabre@nondot.org> | 2003-08-29 05:11:34 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-08-29 05:11:34 +0000 |
commit | ad217a4ca29eacbd66e9ff5528ec8af379bc52d8 (patch) | |
tree | 0076e850b8982fa3b42d7d0fe4d945aa7e55a361 | |
parent | 2bc065b63a8377456ddbe149621b3daf15f052a4 (diff) |
Fix bug: Linker/2003-08-28-TypeResolvesGlobal2.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8206 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/VMCore/SymbolTable.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/VMCore/SymbolTable.cpp b/lib/VMCore/SymbolTable.cpp index b5476178db..5a365dd330 100644 --- a/lib/VMCore/SymbolTable.cpp +++ b/lib/VMCore/SymbolTable.cpp @@ -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 |