If you somehow added a MachineOperand to an instruction
that did not have the parent set, the verifier would
crash since it attempts to use the operand's parent.
Details
Details
- Reviewers
qcolombet
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Hmm, in that case, why do we need that check?
I just wonder how we could end up in such situation if we use the dedicated APIs.
Comment Actions
I see :).
Looks like the RemoveOperand/addOperand gymnastic may bit someone else.
LGTM.
Q.
lib/CodeGen/MachineVerifier.cpp | ||
---|---|---|
336 | Maybe add a comment saying that we should make sure to use RemoveOperand/addOperand or ChangeTo APIs. |
Maybe add a comment saying that we should make sure to use RemoveOperand/addOperand or ChangeTo APIs.