Use Op<0> accessor instead of OperandList for Instructions. NFC
This is consistent with other uses of the operand list. I'm planning a future commit where this will actually matter.
llvm-svn: 237967
diff --git a/llvm/lib/IR/Instructions.cpp b/llvm/lib/IR/Instructions.cpp
index 571eeea..1e9d9a5 100644
--- a/llvm/lib/IR/Instructions.cpp
+++ b/llvm/lib/IR/Instructions.cpp
@@ -227,7 +227,7 @@
ReservedSpace = NumReservedValues;
NumOperands = 1;
OperandList = allocHungoffUses(ReservedSpace);
- OperandList[0] = PersFn;
+ Op<0>() = PersFn;
setName(NameStr);
setCleanup(false);
}
@@ -1239,7 +1239,7 @@
void GetElementPtrInst::init(Value *Ptr, ArrayRef<Value *> IdxList,
const Twine &Name) {
assert(NumOperands == 1 + IdxList.size() && "NumOperands not initialized?");
- OperandList[0] = Ptr;
+ Op<0>() = Ptr;
std::copy(IdxList.begin(), IdxList.end(), op_begin() + 1);
setName(Name);
}
@@ -3298,8 +3298,8 @@
NumOperands = 2;
OperandList = allocHungoffUses(ReservedSpace);
- OperandList[0] = Value;
- OperandList[1] = Default;
+ Op<0>() = Value;
+ Op<1>() = Default;
}
/// SwitchInst ctor - Create a new switch instruction, specifying a value to
@@ -3417,7 +3417,7 @@
NumOperands = 1;
OperandList = allocHungoffUses(ReservedSpace);
- OperandList[0] = Address;
+ Op<0>() = Address;
}