]> granicus.if.org Git - clang/commitdiff
[coroutines] update coro_end builtin to match llvm
authorGor Nishanov <GorNishanov@gmail.com>
Tue, 7 Mar 2017 21:01:08 +0000 (21:01 +0000)
committerGor Nishanov <GorNishanov@gmail.com>
Tue, 7 Mar 2017 21:01:08 +0000 (21:01 +0000)
Summary: llvm.coro.end intrinsic now returns bool. Updating clang to match it.

Reviewers: GorNishanov, rsmith

Reviewed By: rsmith

Subscribers: mehdi_amini, cfe-commits, EricWF

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@297224 91177308-0d34-0410-b5e6-96231b3b80d8

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

index 179b8265de3e3b0a0c421a119d0d2c93f0da9854..e7084de9ceb3535339411ad9a6c30fcaab4d4859 100644 (file)
@@ -1365,7 +1365,7 @@ BUILTIN(__builtin_coro_free, "v*v*", "n")
 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.
index 5c3e6c3a6bdfff817c2277102ef627d32ab1edb5..d18d5e730f91132a2cafc19c60b9be23a18849fe 100644 (file)
@@ -43,7 +43,7 @@ void f(int n) {
   __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)