X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=include%2Fllvm%2FInstructions.h;h=d6dd94d9e9a8f1e25cfb730a0f6a24bab0bb35fc;hp=413a595ab38af64d902a9a0fd91b55ad012ca1f6;hb=2ff961f66816daab8bbc58a19025161d969821c2;hpb=83821c8941b7e9e70de9d5e76556b07872ac371b diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h index 413a595ab38..d6dd94d9e9a 100644 --- a/include/llvm/Instructions.h +++ b/include/llvm/Instructions.h @@ -1031,17 +1031,17 @@ public: /// indirect function invocation. /// Function *getCalledFunction() const { - return dyn_cast(Op<0>()); + return dyn_cast(Op<-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<-1>(); } + Value *getCalledValue() { return Op<-1>(); } /// setCalledFunction - Set the function called. void setCalledFunction(Value* Fn) { - Op<0>() = Fn; + Op<-1>() = Fn; } // Methods for support type inquiry through isa, cast, and dyn_cast: @@ -1071,7 +1071,7 @@ CallInst::CallInst(Value *Func, InputIterator ArgBegin, InputIterator ArgEnd, ->getElementType())->getReturnType(), Instruction::Call, OperandTraits::op_end(this) - (ArgEnd - ArgBegin + 1), - (unsigned)(ArgEnd - ArgBegin + 1), InsertAtEnd) { + unsigned(ArgEnd - ArgBegin + 1), InsertAtEnd) { init(Func, ArgBegin, ArgEnd, NameStr, typename std::iterator_traits::iterator_category()); }