[PATCH] MachineVerifier: Don't crash if MachineOperand has no parent

Quentin Colombet qcolombet at apple.com
Wed Apr 29 16:30:51 PDT 2015


I see :).
Looks like the RemoveOperand/addOperand gymnastic may bit someone else.

LGTM.

Q.


================
Comment at: lib/CodeGen/MachineVerifier.cpp:336
@@ +335,3 @@
+          if (Op.getParent() != &MI)
+            report("Instruction has operand with wrong parent set", &MI);
+
----------------
Maybe add a comment saying that we should make sure to use RemoveOperand/addOperand or ChangeTo APIs.

http://reviews.llvm.org/D9355

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list