diff options
author | Gabor Greif <ggreif@gmail.com> | 2010-07-13 15:31:36 +0000 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2010-07-13 15:31:36 +0000 |
commit | 63d024fc9a4f89987fa2cf7ab466ea17ec78ed14 (patch) | |
tree | 5b68f34a7f7b021e6d68f19d375e92f2e59f051e /include | |
parent | 26fe25f6517238fd113f280863ffe0fbe237dd7c (diff) |
rotate CallInst operands
with this commit the callee moves to the end of
the operand array (from the start) and the call
arguments now start at index 0 (formerly 1)
this ordering is now consistent with InvokeInst
this commit only flips the switch,
functionally it is equivalent to
r101465
I intend to commit several cleanups after a few
days of soak period
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108240 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Instructions.h | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h index 078bf6862f..af93a294cc 100644 --- a/include/llvm/Instructions.h +++ b/include/llvm/Instructions.h @@ -944,6 +944,9 @@ public: /// @deprecated these "define hacks" will go away soon /// @brief coerce out-of-tree code to abandon the low-level interfaces /// @detail see below comments and update your code to high-level interfaces + /// - getOperand(0) ---> getCalledValue(), or possibly getCalledFunction + /// - setOperand(0, V) ---> setCalledFunction(V) + /// /// in LLVM v2.8-only code /// - getOperand(N+1) ---> getArgOperand(N) /// - setOperand(N+1, V) ---> setArgOperand(N, V) @@ -961,23 +964,11 @@ public: # undef protected public: - enum { ArgOffset = 1 }; ///< temporary, do not use for new code! + enum { ArgOffset = 0 }; ///< temporary, do not use for new code! unsigned getNumArgOperands() const { return getNumOperands() - 1; } Value *getArgOperand(unsigned i) const { return getOperand(i + ArgOffset); } void setArgOperand(unsigned i, Value *v) { setOperand(i + ArgOffset, v); } - /// Provide compile-time errors for accessing operand 0 - /// @deprecated these will go away soon - /// @detail see below comments and update your code to high-level interfaces - /// - getOperand(0) ---> getCalledValue(), or possibly getCalledFunction - /// - setOperand(0, V) ---> setCalledFunction(V) - /// -private: - void getOperand(void*); // NO IMPL ---> use getCalledValue (or possibly - // getCalledFunction) instead - void setOperand(void*, Value*); // NO IMPL ---> use setCalledFunction instead -public: - /// getCallingConv/setCallingConv - Get or set the calling convention of this /// function call. CallingConv::ID getCallingConv() const { |