From: Chris Lattner Date: Sun, 24 Aug 2003 19:30:20 +0000 (+0000) Subject: Fix bug: Linker/2003-08-23-GlobalVarLinking.ll X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=77c5f733ac51c122ee3f75b8cc247b923d472909;p=oota-llvm.git Fix bug: Linker/2003-08-23-GlobalVarLinking.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8130 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp index c6adff25867..5280c04565f 100644 --- a/lib/Linker/LinkModules.cpp +++ b/lib/Linker/LinkModules.cpp @@ -348,7 +348,7 @@ static GlobalValue *FindGlobalNamed(const std::string &Name, const Type *Ty, // table, checking each of them for a type-compatible version. // for (SymbolTable::iterator I = ST->begin(), E = ST->end(); I != E; ++I) - if (I->first->getType() != Type::TypeTy) { + if (I->first != Type::TypeTy) { SymbolTable::VarMap &VM = I->second; // Does this type plane contain an entry with the specified name? SymbolTable::type_iterator TI = VM.find(Name); diff --git a/lib/Transforms/Utils/Linker.cpp b/lib/Transforms/Utils/Linker.cpp index c6adff25867..5280c04565f 100644 --- a/lib/Transforms/Utils/Linker.cpp +++ b/lib/Transforms/Utils/Linker.cpp @@ -348,7 +348,7 @@ static GlobalValue *FindGlobalNamed(const std::string &Name, const Type *Ty, // table, checking each of them for a type-compatible version. // for (SymbolTable::iterator I = ST->begin(), E = ST->end(); I != E; ++I) - if (I->first->getType() != Type::TypeTy) { + if (I->first != Type::TypeTy) { SymbolTable::VarMap &VM = I->second; // Does this type plane contain an entry with the specified name? SymbolTable::type_iterator TI = VM.find(Name); diff --git a/lib/VMCore/Linker.cpp b/lib/VMCore/Linker.cpp index c6adff25867..5280c04565f 100644 --- a/lib/VMCore/Linker.cpp +++ b/lib/VMCore/Linker.cpp @@ -348,7 +348,7 @@ static GlobalValue *FindGlobalNamed(const std::string &Name, const Type *Ty, // table, checking each of them for a type-compatible version. // for (SymbolTable::iterator I = ST->begin(), E = ST->end(); I != E; ++I) - if (I->first->getType() != Type::TypeTy) { + if (I->first != Type::TypeTy) { SymbolTable::VarMap &VM = I->second; // Does this type plane contain an entry with the specified name? SymbolTable::type_iterator TI = VM.find(Name);