use ArgOffset constant to prepare for operand rotation
authorGabor Greif <ggreif@gmail.com>
Tue, 29 Jun 2010 16:21:20 +0000 (16:21 +0000)
committerGabor Greif <ggreif@gmail.com>
Tue, 29 Jun 2010 16:21:20 +0000 (16:21 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107146 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Instructions.h

index 29c36e0e4496d1bfa814601addf95120a61a381c..57c9727b231391828f5dd92a670d635b7220f9dc 100644 (file)
@@ -1039,17 +1039,17 @@ public:
   /// indirect function invocation.
   ///
   Function *getCalledFunction() const {
-    return dyn_cast<Function>(Op<0>());
+    return dyn_cast<Function>(Op<ArgOffset -1>());
   }
 
   /// getCalledValue - Get a pointer to the function that is invoked by this
   /// instruction.
-  const Value *getCalledValue() const { return Op<0>(); }
-        Value *getCalledValue()       { return Op<0>(); }
+  const Value *getCalledValue() const { return Op<ArgOffset -1>(); }
+        Value *getCalledValue()       { return Op<ArgOffset -1>(); }
 
   /// setCalledFunction - Set the function called.
   void setCalledFunction(Value* Fn) {
-    Op<0>() = Fn;
+    Op<ArgOffset -1>() = Fn;
   }
 
   // Methods for support type inquiry through isa, cast, and dyn_cast: