[PATCH] Fix confusing machine verifier error.

Matt Arsenault Matthew.Arsenault at amd.com
Mon Oct 21 18:02:25 PDT 2013


The error reported the number of explicit operands,
but that isn't what is checked. In my case, this
resulted in the confusing errors
    
"Too few operands." followed shortly by
"8 operands expected, but 8 given."

I'm not 100% sure I should be changing the message and not the condition instead.


http://llvm-reviews.chandlerc.com/D1991

Files:
  lib/CodeGen/MachineVerifier.cpp

Index: lib/CodeGen/MachineVerifier.cpp
===================================================================
--- lib/CodeGen/MachineVerifier.cpp
+++ lib/CodeGen/MachineVerifier.cpp
@@ -775,7 +775,7 @@
   if (MI->getNumOperands() < MCID.getNumOperands()) {
     report("Too few operands", MI);
     *OS << MCID.getNumOperands() << " operands expected, but "
-        << MI->getNumExplicitOperands() << " given.\n";
+        << MI->getNumOperands() << " given.\n";
   }
 
   // Check the tied operands.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D1991.1.patch
Type: text/x-patch
Size: 499 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131021/ce4a5493/attachment.bin>


More information about the llvm-commits mailing list