aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis/IPA/GlobalsModRef.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2010-04-16 23:37:20 +0000
committerEric Christopher <echristo@apple.com>2010-04-16 23:37:20 +0000
commit551754c4958086cc6910da7c950f2875e212f5cf (patch)
tree0287e856d7bde9ea8c3e629ffb889a78b778f634 /lib/Analysis/IPA/GlobalsModRef.cpp
parentf2548caaa8b290aa598bf49c27dff72f7751ba5c (diff)
downloadexternal_llvm-551754c4958086cc6910da7c950f2875e212f5cf.zip
external_llvm-551754c4958086cc6910da7c950f2875e212f5cf.tar.gz
external_llvm-551754c4958086cc6910da7c950f2875e212f5cf.tar.bz2
Revert 101465, it broke internal OpenGL testing.
Probably the best way to know that all getOperand() calls have been handled is to replace that API instead of updating. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101579 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/IPA/GlobalsModRef.cpp')
-rw-r--r--lib/Analysis/IPA/GlobalsModRef.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Analysis/IPA/GlobalsModRef.cpp b/lib/Analysis/IPA/GlobalsModRef.cpp
index a6403d0..b14afa3 100644
--- a/lib/Analysis/IPA/GlobalsModRef.cpp
+++ b/lib/Analysis/IPA/GlobalsModRef.cpp
@@ -252,7 +252,7 @@ bool GlobalsModRef::AnalyzeUsesOfPointer(Value *V,
} else if (CallInst *CI = dyn_cast<CallInst>(*UI)) {
// Make sure that this is just the function being called, not that it is
// passing into the function.
- for (unsigned i = 0, e = CI->getNumOperands() - 1; i != e; ++i)
+ for (unsigned i = 1, e = CI->getNumOperands(); i != e; ++i)
if (CI->getOperand(i) == V) return true;
} else if (InvokeInst *II = dyn_cast<InvokeInst>(*UI)) {
// Make sure that this is just the function being called, not that it is