[llvm-commits] CVS: llvm/lib/Bytecode/Reader/ReaderWrappers.cpp

Reid Spencer reid at x10sys.com
Sun Feb 13 10:12:31 PST 2005



Changes in directory llvm/lib/Bytecode/Reader:

ReaderWrappers.cpp updated: 1.42 -> 1.43
---
Log message:

Make the check for global variables the same as the one for functions. In
both cases they are looking for non-external variables/functions that do
not have internal linkage. Using "!isExternal()" is a little more
understandable than "hasInitializer()"


---
Diffs of the changes:  (+1 -1)

 ReaderWrappers.cpp |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/lib/Bytecode/Reader/ReaderWrappers.cpp
diff -u llvm/lib/Bytecode/Reader/ReaderWrappers.cpp:1.42 llvm/lib/Bytecode/Reader/ReaderWrappers.cpp:1.43
--- llvm/lib/Bytecode/Reader/ReaderWrappers.cpp:1.42	Sun Feb 13 11:42:11 2005
+++ llvm/lib/Bytecode/Reader/ReaderWrappers.cpp	Sun Feb 13 12:12:20 2005
@@ -331,7 +331,7 @@
 static void getSymbols(Module*M, std::vector<std::string>& symbols) {
   // Loop over global variables
   for (Module::giterator GI = M->gbegin(), GE=M->gend(); GI != GE; ++GI)
-    if (GI->hasInitializer() && !GI->hasInternalLinkage())
+    if (!GI->isExternal() && !GI->hasInternalLinkage())
       if (!GI->getName().empty())
         symbols.push_back(GI->getName());
 






More information about the llvm-commits mailing list