diff options
author | Eric Christopher <echristo@apple.com> | 2010-04-16 23:37:20 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2010-04-16 23:37:20 +0000 |
commit | 551754c4958086cc6910da7c950f2875e212f5cf (patch) | |
tree | 0287e856d7bde9ea8c3e629ffb889a78b778f634 /include/llvm/Support | |
parent | f2548caaa8b290aa598bf49c27dff72f7751ba5c (diff) | |
download | external_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 'include/llvm/Support')
-rw-r--r-- | include/llvm/Support/CallSite.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/include/llvm/Support/CallSite.h b/include/llvm/Support/CallSite.h index 7667ba0..0650b61 100644 --- a/include/llvm/Support/CallSite.h +++ b/include/llvm/Support/CallSite.h @@ -255,21 +255,27 @@ public: private: /// Returns the operand number of the first argument unsigned getArgumentOffset() const { + if (isCall()) + return 1; // Skip Function (ATM) + else return 0; // Args are at the front } unsigned getArgumentEndOffset() const { if (isCall()) - return 1; // Skip Function + return 0; // Unchanged (ATM) else return 3; // Skip BB, BB, Function } IterTy getCallee() const { - // FIXME: this is slow, since we do not have the fast versions - // of the op_*() functions here. See CallSite::getCallee. - // - return arg_end(); + // FIXME: this is slow, since we do not have the fast versions + // of the op_*() functions here. See CallSite::getCallee. + // + if (isCall()) + return getInstruction()->op_begin(); // Unchanged (ATM) + else + return getInstruction()->op_end() - 3; // Skip BB, BB, Function } }; |