From e840434755e2165ac20ec55e9d5ff3d2defac2d2 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Sun, 18 Jul 2004 00:18:30 +0000 Subject: bug 122: - Replace ConstantPointerRef usage with GlobalValue usage - Minimize redundant isa usage - Correct isa for GlobalValue subclass git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14942 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/IPA/GlobalsModRef.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lib/Analysis/IPA/GlobalsModRef.cpp') diff --git a/lib/Analysis/IPA/GlobalsModRef.cpp b/lib/Analysis/IPA/GlobalsModRef.cpp index c3f6ba9386..cb1d360a93 100644 --- a/lib/Analysis/IPA/GlobalsModRef.cpp +++ b/lib/Analysis/IPA/GlobalsModRef.cpp @@ -165,8 +165,8 @@ bool GlobalsModRef::AnalyzeUsesOfGlobal(Value *V, } else { return true; } - } else if (ConstantPointerRef *CPR = dyn_cast(*UI)) { - if (AnalyzeUsesOfGlobal(CPR, Readers, Writers)) return true; + } else if (GlobalValue *GV = dyn_cast(*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(V)) { - return CPR->getValue(); } return 0; } -- cgit v1.2.3