[NFC][Coroutine] Fix an error message on coro.id verification
authorXun Li <lxfind@gmail.com>
Fri, 12 Feb 2021 18:43:08 +0000 (10:43 -0800)
committerXun Li <lxfind@gmail.com>
Fri, 12 Feb 2021 18:44:03 +0000 (10:44 -0800)
The error message should be about coro.id, not coro.begin

Differential Revision: https://reviews.llvm.org/D96447

llvm/lib/IR/Verifier.cpp

index 62ec095..6027cf8 100644 (file)
@@ -4593,12 +4593,12 @@ void Verifier::visitIntrinsicCall(Intrinsic::ID ID, CallBase &Call) {
       break;
     auto *GV = dyn_cast<GlobalVariable>(InfoArg);
     Assert(GV && GV->isConstant() && GV->hasDefinitiveInitializer(),
-      "info argument of llvm.coro.begin must refer to an initialized "
-      "constant");
+           "info argument of llvm.coro.id must refer to an initialized "
+           "constant");
     Constant *Init = GV->getInitializer();
     Assert(isa<ConstantStruct>(Init) || isa<ConstantArray>(Init),
-      "info argument of llvm.coro.begin must refer to either a struct or "
-      "an array");
+           "info argument of llvm.coro.id must refer to either a struct or "
+           "an array");
     break;
   }
 #define INSTRUCTION(NAME, NARGS, ROUND_MODE, INTRINSIC)                        \