summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/IPA/GlobalsModRef.cpp
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2010-04-16 01:16:20 +0000
committerGabor Greif <ggreif@gmail.com>2010-04-16 01:16:20 +0000
commit403e9694f9e284cb145bb6f40b1b7c9f70a125f1 (patch)
tree1b7aaa95239227c67473d032a9dfae5b48c122d2 /llvm/lib/Analysis/IPA/GlobalsModRef.cpp
parent393e08536dbe9ca338c6d15a97731737c174ce7b (diff)
downloadbcm5719-llvm-403e9694f9e284cb145bb6f40b1b7c9f70a125f1.tar.gz
bcm5719-llvm-403e9694f9e284cb145bb6f40b1b7c9f70a125f1.zip
back out r101423 and r101397, they break llvm-gcc self-host on darwin10
llvm-svn: 101434
Diffstat (limited to 'llvm/lib/Analysis/IPA/GlobalsModRef.cpp')
-rw-r--r--llvm/lib/Analysis/IPA/GlobalsModRef.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/IPA/GlobalsModRef.cpp b/llvm/lib/Analysis/IPA/GlobalsModRef.cpp
index a6403d04ce4..b14afa32313 100644
--- a/llvm/lib/Analysis/IPA/GlobalsModRef.cpp
+++ b/llvm/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
OpenPOWER on IntegriCloud