diff options
author | Gabor Greif <ggreif@gmail.com> | 2010-07-01 21:46:41 +0000 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2010-07-01 21:46:41 +0000 |
commit | a141d92f58af2af4f0d5c9e028d2199caa47405e (patch) | |
tree | 23494011a4c51ce76a37009478fb9c302fad1206 | |
parent | c7be3133a7438d16d32c98d532fe78143f4d8745 (diff) | |
download | external_llvm-a141d92f58af2af4f0d5c9e028d2199caa47405e.zip external_llvm-a141d92f58af2af4f0d5c9e028d2199caa47405e.tar.gz external_llvm-a141d92f58af2af4f0d5c9e028d2199caa47405e.tar.bz2 |
evil hack to coerce external users (projects)
to update their code to high-level interfaces
If you get compile errors in your project
please update your code according to the
comments.
This is a re-commit of r107396 which causes
compile errors for the indicated usage patterns
instead of link errors (which are less easy to
fix because of missing source location).
If you get compile errors please perform
following functionally equivalent transformations:
- getOperand(0) ---> getCalledValue()
- setOperand(0, V) ---> setCalledFunction(V)
This will make your code more future-proof
and avoid potentially hard-to-debug bugs.
please refer to this thread on llvm-dev:
<http://groups.google.com/group/llvm-dev/browse_thread/thread/64650cf343b28271>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107432 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/Instructions.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h index 8143292..21cc2ea 100644 --- a/include/llvm/Instructions.h +++ b/include/llvm/Instructions.h @@ -948,6 +948,17 @@ public: 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() + /// - 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 { |