[PATCH] D79128: Make wrong preallocated arg count verifier error clearer

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 29 18:57:20 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG52ec98389543: Make wrong preallocated arg count verifier error clearer (authored by aeubanks).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79128/new/

https://reviews.llvm.org/D79128

Files:
  llvm/lib/IR/Verifier.cpp
  llvm/test/Verifier/preallocated-invalid.ll


Index: llvm/test/Verifier/preallocated-invalid.ll
===================================================================
--- llvm/test/Verifier/preallocated-invalid.ll
+++ llvm/test/Verifier/preallocated-invalid.ll
@@ -98,7 +98,7 @@
     ret void
 }
 
-; CHECK: arg size must be equal to number of arguments
+; CHECK: arg size must be equal to number of preallocated arguments
 define void @preallocated_num_args() {
     %cs = call token @llvm.call.preallocated.setup(i32 3)
     %x = call i8* @llvm.call.preallocated.arg(token %cs, i32 0) preallocated(i32)
Index: llvm/lib/IR/Verifier.cpp
===================================================================
--- llvm/lib/IR/Verifier.cpp
+++ llvm/lib/IR/Verifier.cpp
@@ -4507,8 +4507,9 @@
         }
         Assert(NumArgs->equalsInt(NumPreallocatedArgs),
                "llvm.call.preallocated.setup arg size must be equal to number "
-               "of arguments "
-               "at call site");
+               "of preallocated arguments "
+               "at call site",
+               Call, *UseCall);
         // getOperandBundle() cannot be called if more than one of the operand
         // bundle exists. There is already a check elsewhere for this, so skip
         // here if we see more than one.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79128.261113.patch
Type: text/x-patch
Size: 1262 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200430/e4876e5d/attachment.bin>


More information about the llvm-commits mailing list