Fix bug: Linker/2003-08-23-GlobalVarLinking.ll
authorChris Lattner <sabre@nondot.org>
Sun, 24 Aug 2003 19:30:20 +0000 (19:30 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 24 Aug 2003 19:30:20 +0000 (19:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8130 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Linker/LinkModules.cpp
lib/Transforms/Utils/Linker.cpp
lib/VMCore/Linker.cpp

index c6adff258675e47d5fcf2a8bbef3194683dfa126..5280c04565f3f7fe6a004bb4fbcc9fde841641c6 100644 (file)
@@ -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);
index c6adff258675e47d5fcf2a8bbef3194683dfa126..5280c04565f3f7fe6a004bb4fbcc9fde841641c6 100644 (file)
@@ -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);
index c6adff258675e47d5fcf2a8bbef3194683dfa126..5280c04565f3f7fe6a004bb4fbcc9fde841641c6 100644 (file)
@@ -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);