[llvm-commits] [llvm] r107432 - /llvm/trunk/include/llvm/Instructions.h
Chris Lattner
clattner at apple.com
Sun Jul 4 10:27:03 PDT 2010
Alright, but please stay in 80 columns.
-Chris
On Jul 1, 2010, at 2:46 PM, Gabor Greif wrote:
> Author: ggreif
> Date: Thu Jul 1 16:46:41 2010
> New Revision: 107432
>
> URL: http://llvm.org/viewvc/llvm-project?rev=107432&view=rev
> Log:
> 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>
>
>
> Modified:
> llvm/trunk/include/llvm/Instructions.h
>
> Modified: llvm/trunk/include/llvm/Instructions.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Instructions.h?rev=107432&r1=107431&r2=107432&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/Instructions.h (original)
> +++ llvm/trunk/include/llvm/Instructions.h Thu Jul 1 16:46:41 2010
> @@ -948,6 +948,17 @@
> 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 {
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list