[PATCH] D30711: [coroutines] update coro_end builtin to match llvm

Gor Nishanov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 7 11:22:52 PST 2017


GorNishanov created this revision.
Herald added subscribers: EricWF, mehdi_amini.

llvm.coro.end intrinsic now returns bool. Updating clang to match it.


https://reviews.llvm.org/D30711

Files:
  include/clang/Basic/Builtins.def
  test/CodeGenCoroutines/coro-builtins.c


Index: test/CodeGenCoroutines/coro-builtins.c
===================================================================
--- test/CodeGenCoroutines/coro-builtins.c
+++ test/CodeGenCoroutines/coro-builtins.c
@@ -43,7 +43,7 @@
   __builtin_coro_free(__builtin_coro_frame());
 
   // CHECK-NEXT: %[[FRAME6:.+]] = call i8* @llvm.coro.frame() 
-  // CHECK-NEXT: call void @llvm.coro.end(i8* %[[FRAME6]], i1 false)
+  // CHECK-NEXT: call i1 @llvm.coro.end(i8* %[[FRAME6]], i1 false)
   __builtin_coro_end(__builtin_coro_frame(), 0);
 
   // CHECK-NEXT: call i8 @llvm.coro.suspend(token none, i1 true)
Index: include/clang/Basic/Builtins.def
===================================================================
--- include/clang/Basic/Builtins.def
+++ include/clang/Basic/Builtins.def
@@ -1365,7 +1365,7 @@
 BUILTIN(__builtin_coro_id, "v*Iiv*v*v*", "n")
 BUILTIN(__builtin_coro_alloc, "b", "n")
 BUILTIN(__builtin_coro_begin, "v*v*", "n")
-BUILTIN(__builtin_coro_end, "vv*Ib", "n")
+BUILTIN(__builtin_coro_end, "bv*Ib", "n")
 BUILTIN(__builtin_coro_suspend, "cIb", "n")
 BUILTIN(__builtin_coro_param, "bv*v*", "n")
 // OpenCL v2.0 s6.13.16, s9.17.3.5 - Pipe functions.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30711.90897.patch
Type: text/x-patch
Size: 1154 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170307/6afc925f/attachment.bin>


More information about the cfe-commits mailing list