summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/IPA/GlobalsModRef.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-07-18 00:18:30 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-07-18 00:18:30 +0000
commit30d69a5af91f3a558f0fd6edaf569970bb95f135 (patch)
tree658977b1e94894d6f7bc8d53c68b8d9f4686108a /llvm/lib/Analysis/IPA/GlobalsModRef.cpp
parent51fe3361b6731f96ffdb924cb6f4769f03a99a8e (diff)
downloadbcm5719-llvm-30d69a5af91f3a558f0fd6edaf569970bb95f135.tar.gz
bcm5719-llvm-30d69a5af91f3a558f0fd6edaf569970bb95f135.zip
bug 122:
- Replace ConstantPointerRef usage with GlobalValue usage - Minimize redundant isa<GlobalValue> usage - Correct isa<Constant> for GlobalValue subclass llvm-svn: 14942
Diffstat (limited to 'llvm/lib/Analysis/IPA/GlobalsModRef.cpp')
-rw-r--r--llvm/lib/Analysis/IPA/GlobalsModRef.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Analysis/IPA/GlobalsModRef.cpp b/llvm/lib/Analysis/IPA/GlobalsModRef.cpp
index c3f6ba93861..cb1d360a930 100644
--- a/llvm/lib/Analysis/IPA/GlobalsModRef.cpp
+++ b/llvm/lib/Analysis/IPA/GlobalsModRef.cpp
@@ -165,8 +165,8 @@ bool GlobalsModRef::AnalyzeUsesOfGlobal(Value *V,
} else {
return true;
}
- } else if (ConstantPointerRef *CPR = dyn_cast<ConstantPointerRef>(*UI)) {
- if (AnalyzeUsesOfGlobal(CPR, Readers, Writers)) return true;
+ } else if (GlobalValue *GV = dyn_cast<GlobalValue>(*UI)) {
+ if (AnalyzeUsesOfGlobal(GV, Readers, Writers)) return true;
} else {
return true;
}
@@ -257,8 +257,6 @@ static const GlobalValue *getUnderlyingObject(const Value *V) {
if (CE->getOpcode() == Instruction::Cast ||
CE->getOpcode() == Instruction::GetElementPtr)
return getUnderlyingObject(CE->getOperand(0));
- } else if (const ConstantPointerRef *CPR = dyn_cast<ConstantPointerRef>(V)) {
- return CPR->getValue();
}
return 0;
}
OpenPOWER on IntegriCloud