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 c6adff2..5280c04 100644
--- a/lib/Linker/LinkModules.cpp
+++ b/lib/Linker/LinkModules.cpp
@@ -348,7 +348,7 @@
   // 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);