mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 11:02:59 +02:00
Do not allow a user to set the operand for a constant.
llvm-svn: 58335
This commit is contained in:
parent
12f71cb784
commit
7bd0aec942
@ -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