mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 21:00:29 +00:00
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()" llvm-svn: 20155
This commit is contained in:
parent
0ac02cee3c
commit
a7a01f13df
@ -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());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user