summaryrefslogtreecommitdiff
path: root/lib/Bytecode
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2005-02-13 18:12:20 +0000
committerReid Spencer <rspencer@reidspencer.com>2005-02-13 18:12:20 +0000
commit818827d734d6b4fa55a638a69e751a960e4a2a94 (patch)
tree611fe290a9e4ccd5365e97467bc6e1c950fc362b /lib/Bytecode
parent1117bb0e9911e5f0fbdadafc08189a515be4ede5 (diff)
downloadllvm-818827d734d6b4fa55a638a69e751a960e4a2a94.tar.gz
llvm-818827d734d6b4fa55a638a69e751a960e4a2a94.tar.bz2
llvm-818827d734d6b4fa55a638a69e751a960e4a2a94.tar.xz
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()" git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20155 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bytecode')
-rw-r--r--lib/Bytecode/Reader/ReaderWrappers.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Bytecode/Reader/ReaderWrappers.cpp b/lib/Bytecode/Reader/ReaderWrappers.cpp
index ce54b7a4e2..449bf86381 100644
--- a/lib/Bytecode/Reader/ReaderWrappers.cpp
+++ b/lib/Bytecode/Reader/ReaderWrappers.cpp
@@ -331,7 +331,7 @@ bool llvm::GetBytecodeDependentLibraries(const std::string &fname,
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());