mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
Do not allow a user to set the operand for a constant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58335 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2b9cbf127f
commit
803f5fc02f
@ -95,6 +95,9 @@ public:
|
||||
}
|
||||
void setOperand(unsigned i, Value *Val) {
|
||||
assert(i < NumOperands && "setOperand() out of range!");
|
||||
assert((!isa<Constant>((const Value*)this) ||
|
||||
isa<GlobalValue>((const Value*)this)) &&
|
||||
"Cannot mutate a constant with setOperand!");
|
||||
OperandList[i] = Val;
|
||||
}
|
||||
unsigned getNumOperands() const { return NumOperands; }
|
||||
|
Loading…
Reference in New Issue
Block a user