[llvm] a0d09ce - [NFC][Coroutine] Fix an error message on coro.id verification

Xun Li via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 12 10:44:11 PST 2021


Author: Xun Li
Date: 2021-02-12T10:44:03-08:00
New Revision: a0d09ce4600ba14e59129a4cbca10212a1d9dc82

URL: https://github.com/llvm/llvm-project/commit/a0d09ce4600ba14e59129a4cbca10212a1d9dc82
DIFF: https://github.com/llvm/llvm-project/commit/a0d09ce4600ba14e59129a4cbca10212a1d9dc82.diff

LOG: [NFC][Coroutine] Fix an error message on coro.id verification

The error message should be about coro.id, not coro.begin

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

Added: 
    

Modified: 
    llvm/lib/IR/Verifier.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp
index 62ec09561bd8..6027cf85a413 100644
--- a/llvm/lib/IR/Verifier.cpp
+++ b/llvm/lib/IR/Verifier.cpp
@@ -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)                        \


        


More information about the llvm-commits mailing list