Fix a ValueTracking rule: RHS means operand 1, not 0. Add a simple
[oota-llvm.git] / lib / Archive / Archive.cpp
index 776f4dd367ce5f0af7c5b0bfe64e5836143c1017..c6c89d27dbb0ab78592953e2542de3da5ca077eb 100644 (file)
@@ -188,13 +188,13 @@ Archive::~Archive() {
 static void getSymbols(Module*M, std::vector<std::string>& symbols) {
   // Loop over global variables
   for (Module::global_iterator GI = M->global_begin(), GE=M->global_end(); GI != GE; ++GI)
-    if (!GI->isDeclaration() && !GI->hasInternalLinkage())
+    if (!GI->isDeclaration() && !GI->hasLocalLinkage())
       if (!GI->getName().empty())
         symbols.push_back(GI->getName());
   
   // Loop over functions
   for (Module::iterator FI = M->begin(), FE = M->end(); FI != FE; ++FI)
-    if (!FI->isDeclaration() && !FI->hasInternalLinkage())
+    if (!FI->isDeclaration() && !FI->hasLocalLinkage())
       if (!FI->getName().empty())
         symbols.push_back(FI->getName());