[llvm-branch-commits] [llvm-branch] r101582 - in /llvm/branches/ggreif/CallInst-operands: include/llvm/Instructions.h lib/VMCore/Instructions.cpp
Gabor Greif
ggreif at gmail.com
Fri Apr 16 17:04:17 PDT 2010
Author: ggreif
Date: Fri Apr 16 19:04:17 2010
New Revision: 101582
URL: http://llvm.org/viewvc/llvm-project?rev=101582&view=rev
Log:
instrument setOperand too
Modified:
llvm/branches/ggreif/CallInst-operands/include/llvm/Instructions.h
llvm/branches/ggreif/CallInst-operands/lib/VMCore/Instructions.cpp
Modified: llvm/branches/ggreif/CallInst-operands/include/llvm/Instructions.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/CallInst-operands/include/llvm/Instructions.h?rev=101582&r1=101581&r2=101582&view=diff
==============================================================================
--- llvm/branches/ggreif/CallInst-operands/include/llvm/Instructions.h (original)
+++ llvm/branches/ggreif/CallInst-operands/include/llvm/Instructions.h Fri Apr 16 19:04:17 2010
@@ -939,14 +939,16 @@
Value* getOperand(unsigned i)const;
// Value* getOperand(unsigned i);
-
+ void setOperand(unsigned, Value*);
#define getOperand getOperand2
+#define setOperand setOperand2
/// Provide fast operand accessors
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
#undef getOperand
+#undef setOperand
/// getCallingConv/setCallingConv - Get or set the calling convention of this
/// function call.
@@ -1096,9 +1098,11 @@
typename std::iterator_traits<InputIterator>::iterator_category());
}
+#define setOperand setOperand2
#define getOperand getOperand2
DEFINE_TRANSPARENT_OPERAND_ACCESSORS(CallInst, Value)
#undef getOperand
+#undef setOperand
//===----------------------------------------------------------------------===//
// SelectInst Class
//===----------------------------------------------------------------------===//
Modified: llvm/branches/ggreif/CallInst-operands/lib/VMCore/Instructions.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/CallInst-operands/lib/VMCore/Instructions.cpp?rev=101582&r1=101581&r2=101582&view=diff
==============================================================================
--- llvm/branches/ggreif/CallInst-operands/lib/VMCore/Instructions.cpp (original)
+++ llvm/branches/ggreif/CallInst-operands/lib/VMCore/Instructions.cpp Fri Apr 16 19:04:17 2010
@@ -33,6 +33,11 @@
assert(i != getNumOperands() - 1);
return getOperand2(i);
}
+void CallInst::setOperand(unsigned i,Value* v)
+{
+ assert(i != getNumOperands() - 1);
+ return setOperand2(i, v);
+}
/*
Value* getOperand(unsigned i)
{
More information about the llvm-branch-commits
mailing list