diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2009-01-15 20:18:42 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2009-01-15 20:18:42 +0000 |
commit | bb46f52027416598a662dc1c58f48d9d56b1a65b (patch) | |
tree | ebdd7fc62b19bc9bdb7cc03563fd817d3943f17e /lib/Analysis/IPA/GlobalsModRef.cpp | |
parent | f193ff05909c2de373032f773e76804474b1ef4e (diff) | |
download | external_llvm-bb46f52027416598a662dc1c58f48d9d56b1a65b.zip external_llvm-bb46f52027416598a662dc1c58f48d9d56b1a65b.tar.gz external_llvm-bb46f52027416598a662dc1c58f48d9d56b1a65b.tar.bz2 |
Add the private linkage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62279 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/IPA/GlobalsModRef.cpp')
-rw-r--r-- | lib/Analysis/IPA/GlobalsModRef.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Analysis/IPA/GlobalsModRef.cpp b/lib/Analysis/IPA/GlobalsModRef.cpp index 99e9d21..a795ca6 100644 --- a/lib/Analysis/IPA/GlobalsModRef.cpp +++ b/lib/Analysis/IPA/GlobalsModRef.cpp @@ -164,7 +164,7 @@ Pass *llvm::createGlobalsModRefPass() { return new GlobalsModRef(); } void GlobalsModRef::AnalyzeGlobals(Module &M) { std::vector<Function*> Readers, Writers; for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) - if (I->hasInternalLinkage()) { + if (I->hasLocalLinkage()) { if (!AnalyzeUsesOfPointer(I, Readers, Writers)) { // Remember that we are tracking this global. NonAddressTakenGlobals.insert(I); @@ -175,7 +175,7 @@ void GlobalsModRef::AnalyzeGlobals(Module &M) { for (Module::global_iterator I = M.global_begin(), E = M.global_end(); I != E; ++I) - if (I->hasInternalLinkage()) { + if (I->hasLocalLinkage()) { if (!AnalyzeUsesOfPointer(I, Readers, Writers)) { // Remember that we are tracking this global, and the mod/ref fns NonAddressTakenGlobals.insert(I); @@ -504,7 +504,7 @@ GlobalsModRef::getModRefInfo(CallSite CS, Value *P, unsigned Size) { // If we are asking for mod/ref info of a direct call with a pointer to a // global we are tracking, return information if we have it. if (GlobalValue *GV = dyn_cast<GlobalValue>(P->getUnderlyingObject())) - if (GV->hasInternalLinkage()) + if (GV->hasLocalLinkage()) if (Function *F = CS.getCalledFunction()) if (NonAddressTakenGlobals.count(GV)) if (FunctionRecord *FR = getFunctionInfo(F)) |