Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
clang/test/CodeGenCoroutines/coro-cleanup-exp-namespace.cpp
Show First 20 Lines • Show All 75 Lines • ▼ Show 20 Lines | void f() { | ||||
// CHECK: [[Cont]]: | // CHECK: [[Cont]]: | ||||
// CHECK-NEXT: br label %[[Cont2:.+]] | // CHECK-NEXT: br label %[[Cont2:.+]] | ||||
// CHECK: [[Cont2]]: | // CHECK: [[Cont2]]: | ||||
// CHECK-NEXT: br label %[[Cleanup:.+]] | // CHECK-NEXT: br label %[[Cleanup:.+]] | ||||
// CHECK: [[Cleanup]]: | // CHECK: [[Cleanup]]: | ||||
// CHECK: call void @_ZNSt12experimental16coroutine_traitsIJvEE12promise_typeD1Ev( | // CHECK: call void @_ZNSt12experimental16coroutine_traitsIJvEE12promise_typeD1Ev( | ||||
// CHECK: %[[Mem0:.+]] = call i8* @llvm.coro.free( | // CHECK: %[[Mem0:.+]] = call i8* @llvm.coro.free( | ||||
// CHECK: call void @_ZdlPv(i8* noundef %[[Mem0]] | // CHECK: %[[SIZE:.+]] = call i64 @llvm.coro.size.i64() | ||||
// CHECK: call void @_ZdlPvm(i8* noundef %[[Mem0]], i64 noundef %[[SIZE]]) | |||||
// CHECK: [[Dealloc]]: | // CHECK: [[Dealloc]]: | ||||
// CHECK: %[[Mem:.+]] = call i8* @llvm.coro.free( | // CHECK: %[[Mem:.+]] = call i8* @llvm.coro.free( | ||||
// CHECK: call void @_ZdlPv(i8* noundef %[[Mem]]) | // CHECK: %[[SIZE:.+]] = call i64 @llvm.coro.size.i64() | ||||
// CHECK: call void @_ZdlPvm(i8* noundef %[[Mem]], i64 noundef %[[SIZE]]) | |||||
co_return; | co_return; | ||||
} | } | ||||
// CHECK-LABEL: define{{.*}} void @_Z1gv( | // CHECK-LABEL: define{{.*}} void @_Z1gv( | ||||
void g() { | void g() { | ||||
for (;;) | for (;;) | ||||
co_await suspend_always{}; | co_await suspend_always{}; | ||||
// Since this is the endless loop there should be no fallthrough handler (call to 'return_void'). | // Since this is the endless loop there should be no fallthrough handler (call to 'return_void'). | ||||
// CHECK-NOT: call void @_ZNSt12experimental16coroutine_traitsIJvEE12promise_type11return_voidEv | // CHECK-NOT: call void @_ZNSt12experimental16coroutine_traitsIJvEE12promise_type11return_voidEv | ||||
} | } |