From 7258dcd77f19bf5adb5f76d4c2bb5fc426ba75c2 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Fri, 16 Apr 2010 23:37:20 +0000 Subject: 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. llvm-svn: 101579 --- llvm/lib/Analysis/IPA/GlobalsModRef.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Analysis/IPA/GlobalsModRef.cpp') 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(*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(*UI)) { // Make sure that this is just the function being called, not that it is -- cgit v1.2.3