Skip to content

Instantly share code, notes, and snippets.

@modocache
Last active March 19, 2018 22:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save modocache/54a036c3bf9c06882fe85122e105d153 to your computer and use it in GitHub Desktop.
Save modocache/54a036c3bf9c06882fe85122e105d153 to your computer and use it in GitHub Desktop.
The LLVM IR output from https://godbolt.org/g/Gw9UZq, obtained using `clang++ -fcoroutines-ts PR36578.cpp -emit-llvm -O1 -Xclang -disable-llvm-passes -S`, with (PR36578.ll) and without (PR36578.nosan.ll) `-fsanitize=null`.
#include <experimental/coroutine>
struct task {
struct promise_type {
task get_return_object() { return task(); }
std::experimental::suspend_never initial_suspend() { return {}; }
std::experimental::suspend_never final_suspend() { return {}; }
void return_void() {}
void unhandled_exception() {}
};
};
struct awaitable {
// Adding the 'no_sanitize' attribute prevents the crash.
task await() /* __attribute__((no_sanitize("undefined"))) */ {
(void)co_await *this;
}
bool await_ready() { return false; }
bool await_suspend(std::experimental::coroutine_handle<> awaiter) { return false; }
bool await_resume() { return false; }
};
int main() {
awaitable a;
a.await();
}
; ModuleID = 'PR36578.cpp'
source_filename = "PR36578.cpp"
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.13.0"
%"struct.task::promise_type" = type { i8 }
%struct.awaitable = type { i8 }
%struct.task = type { i8 }
%"struct.std::experimental::coroutines_v1::suspend_never" = type { i8 }
%"class.std::experimental::coroutines_v1::coroutine_handle" = type { i8* }
%"class.std::experimental::coroutines_v1::coroutine_handle.0" = type { %"class.std::experimental::coroutines_v1::coroutine_handle" }
@.src = private unnamed_addr constant [12 x i8] c"PR36578.cpp\00", align 1
@0 = private unnamed_addr constant { i16, i16, [14 x i8] } { i16 -1, i16 0, [14 x i8] c"'awaitable *'\00" }
@1 = private unnamed_addr global { { [12 x i8]*, i32, i32 }, { i16, i16, [14 x i8] }*, i8, i8 } { { [12 x i8]*, i32, i32 } { [12 x i8]* @.src, i32 15, i32 8 }, { i16, i16, [14 x i8] }* @0, i8 1, i8 4 }
@_ZZN9awaitable5awaitEvE9__promise = private unnamed_addr constant %"struct.task::promise_type" undef, align 1
@2 = private unnamed_addr constant { i16, i16, [12 x i8] } { i16 -1, i16 0, [12 x i8] c"'awaitable'\00" }
@3 = private unnamed_addr global { { [12 x i8]*, i32, i32 }, { i16, i16, [12 x i8] }*, i8, i8 } { { [12 x i8]*, i32, i32 } { [12 x i8]* @.src, i32 16, i32 11 }, { i16, i16, [12 x i8] }* @2, i8 1, i8 4 }
@4 = private unnamed_addr global { { [12 x i8]*, i32, i32 }, { i16, i16, [12 x i8] }*, i8, i8 } { { [12 x i8]*, i32, i32 } { [12 x i8]* @.src, i32 16, i32 11 }, { i16, i16, [12 x i8] }* @2, i8 1, i8 4 }
@5 = private unnamed_addr global { { [12 x i8]*, i32, i32 }, { i16, i16, [12 x i8] }*, i8, i8 } { { [12 x i8]*, i32, i32 } { [12 x i8]* @.src, i32 16, i32 11 }, { i16, i16, [12 x i8] }* @2, i8 1, i8 4 }
@6 = private unnamed_addr constant { i16, i16, [23 x i8] } { i16 -1, i16 0, [23 x i8] c"'task::promise_type *'\00" }
@7 = private unnamed_addr global { { [12 x i8]*, i32, i32 }, { i16, i16, [23 x i8] }*, i8, i8 } { { [12 x i8]*, i32, i32 } { [12 x i8]* @.src, i32 5, i32 10 }, { i16, i16, [23 x i8] }* @6, i8 1, i8 4 }
@8 = private unnamed_addr global { { [12 x i8]*, i32, i32 }, { i16, i16, [23 x i8] }*, i8, i8 } { { [12 x i8]*, i32, i32 } { [12 x i8]* @.src, i32 6, i32 38 }, { i16, i16, [23 x i8] }* @6, i8 1, i8 4 }
@.src.1 = private unnamed_addr constant [77 x i8] c"/Users/bgesiak/Source/fb/llvm-up/build/include/c++/v1/experimental/coroutine\00", align 1
@9 = private unnamed_addr constant { i16, i16, [58 x i8] } { i16 -1, i16 0, [58 x i8] c"'const std::experimental::coroutines_v1::suspend_never *'\00" }
@10 = private unnamed_addr global { { [77 x i8]*, i32, i32 }, { i16, i16, [58 x i8] }*, i8, i8 } { { [77 x i8]*, i32, i32 } { [77 x i8]* @.src.1, i32 264, i32 8 }, { i16, i16, [58 x i8] }* @9, i8 1, i8 4 }
@11 = private unnamed_addr global { { [77 x i8]*, i32, i32 }, { i16, i16, [58 x i8] }*, i8, i8 } { { [77 x i8]*, i32, i32 } { [77 x i8]* @.src.1, i32 266, i32 8 }, { i16, i16, [58 x i8] }* @9, i8 1, i8 4 }
@12 = private unnamed_addr constant { i16, i16, [75 x i8] } { i16 -1, i16 0, [75 x i8] c"'std::experimental::coroutines_v1::coroutine_handle<task::promise_type> *'\00" }
@13 = private unnamed_addr global { { [77 x i8]*, i32, i32 }, { i16, i16, [75 x i8] }*, i8, i8 } { { [77 x i8]*, i32, i32 } { [77 x i8]* @.src.1, i32 198, i32 28 }, { i16, i16, [75 x i8] }* @12, i8 1, i8 5 }
@14 = private unnamed_addr constant { i16, i16, [73 x i8] } { i16 -1, i16 0, [73 x i8] c"'std::experimental::coroutines_v1::coroutine_handle<task::promise_type>'\00" }
@15 = private unnamed_addr global { { i8*, i32, i32 }, { i16, i16, [73 x i8] }*, i8, i8 } { { i8*, i32, i32 } zeroinitializer, { i16, i16, [73 x i8] }* @14, i8 1, i8 5 }
@16 = private unnamed_addr global { { [77 x i8]*, i32, i32 }, { i16, i16, [75 x i8] }*, i8, i8 } { { [77 x i8]*, i32, i32 } { [77 x i8]* @.src.1, i32 198, i32 28 }, { i16, i16, [75 x i8] }* @12, i8 1, i8 5 }
@17 = private unnamed_addr constant { i16, i16, [59 x i8] } { i16 -1, i16 0, [59 x i8] c"'std::experimental::coroutines_v1::coroutine_handle<void>'\00" }
@18 = private unnamed_addr global { { i8*, i32, i32 }, { i16, i16, [59 x i8] }*, i8, i8 } { { i8*, i32, i32 } zeroinitializer, { i16, i16, [59 x i8] }* @17, i8 1, i8 5 }
@19 = private unnamed_addr constant { i16, i16, [61 x i8] } { i16 -1, i16 0, [61 x i8] c"'std::experimental::coroutines_v1::coroutine_handle<void> *'\00" }
@20 = private unnamed_addr global { { [77 x i8]*, i32, i32 }, { i16, i16, [61 x i8] }*, i8, i8 } { { [77 x i8]*, i32, i32 } { [77 x i8]* @.src.1, i32 97, i32 23 }, { i16, i16, [61 x i8] }* @19, i8 1, i8 5 }
@21 = private unnamed_addr global { { [77 x i8]*, i32, i32 }, { i16, i16, [58 x i8] }*, i8, i8 } { { [77 x i8]*, i32, i32 } { [77 x i8]* @.src.1, i32 268, i32 8 }, { i16, i16, [58 x i8] }* @9, i8 1, i8 4 }
@22 = private unnamed_addr global { { [12 x i8]*, i32, i32 }, { i16, i16, [14 x i8] }*, i8, i8 } { { [12 x i8]*, i32, i32 } { [12 x i8]* @.src, i32 18, i32 8 }, { i16, i16, [14 x i8] }* @0, i8 1, i8 4 }
@23 = private unnamed_addr global { { [12 x i8]*, i32, i32 }, { i16, i16, [14 x i8] }*, i8, i8 } { { [12 x i8]*, i32, i32 } { [12 x i8]* @.src, i32 19, i32 8 }, { i16, i16, [14 x i8] }* @0, i8 1, i8 4 }
@24 = private unnamed_addr global { { [12 x i8]*, i32, i32 }, { i16, i16, [14 x i8] }*, i8, i8 } { { [12 x i8]*, i32, i32 } { [12 x i8]* @.src, i32 20, i32 8 }, { i16, i16, [14 x i8] }* @0, i8 1, i8 4 }
@25 = private unnamed_addr global { { [12 x i8]*, i32, i32 }, { i16, i16, [23 x i8] }*, i8, i8 } { { [12 x i8]*, i32, i32 } { [12 x i8]* @.src, i32 8, i32 10 }, { i16, i16, [23 x i8] }* @6, i8 1, i8 4 }
@26 = private unnamed_addr global { { [12 x i8]*, i32, i32 }, { i16, i16, [23 x i8] }*, i8, i8 } { { [12 x i8]*, i32, i32 } { [12 x i8]* @.src, i32 9, i32 10 }, { i16, i16, [23 x i8] }* @6, i8 1, i8 4 }
@27 = private unnamed_addr global { { [12 x i8]*, i32, i32 }, { i16, i16, [23 x i8] }*, i8, i8 } { { [12 x i8]*, i32, i32 } { [12 x i8]* @.src, i32 7, i32 38 }, { i16, i16, [23 x i8] }* @6, i8 1, i8 4 }
; Function Attrs: norecurse ssp uwtable
define i32 @main() #0 {
entry:
%a = alloca %struct.awaitable, align 1
%undef.agg.tmp = alloca %struct.task, align 1
%0 = bitcast %struct.awaitable* %a to i8*
call void @llvm.lifetime.start.p0i8(i64 1, i8* %0) #5
call void @_ZN9awaitable5awaitEv(%struct.awaitable* %a)
%1 = bitcast %struct.awaitable* %a to i8*
call void @llvm.lifetime.end.p0i8(i64 1, i8* %1) #5
ret i32 0
}
; Function Attrs: argmemonly nounwind
declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #1
; Function Attrs: ssp uwtable
define linkonce_odr void @_ZN9awaitable5awaitEv(%struct.awaitable* %this) #2 align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%retval = alloca %struct.task, align 1
%this.addr = alloca %struct.awaitable*, align 8
%gro.active = alloca i1, align 1
%__promise = alloca %"struct.task::promise_type", align 1
%exn.slot = alloca i8*
%ehselector.slot = alloca i32
%undef.agg.tmp = alloca %struct.task, align 1
%ref.tmp = alloca %"struct.std::experimental::coroutines_v1::suspend_never", align 1
%undef.agg.tmp4 = alloca %"struct.std::experimental::coroutines_v1::suspend_never", align 1
%agg.tmp = alloca %"class.std::experimental::coroutines_v1::coroutine_handle", align 8
%ref.tmp6 = alloca %"class.std::experimental::coroutines_v1::coroutine_handle.0", align 8
%agg.tmp18 = alloca %"class.std::experimental::coroutines_v1::coroutine_handle", align 8
%ref.tmp19 = alloca %"class.std::experimental::coroutines_v1::coroutine_handle.0", align 8
%ref.tmp40 = alloca %"struct.std::experimental::coroutines_v1::suspend_never", align 1
%undef.agg.tmp43 = alloca %"struct.std::experimental::coroutines_v1::suspend_never", align 1
%agg.tmp45 = alloca %"class.std::experimental::coroutines_v1::coroutine_handle", align 8
%ref.tmp46 = alloca %"class.std::experimental::coroutines_v1::coroutine_handle.0", align 8
store %struct.awaitable* %this, %struct.awaitable** %this.addr, align 8, !tbaa !3
%this1 = load %struct.awaitable*, %struct.awaitable** %this.addr, align 8
%0 = icmp ne %struct.awaitable* %this1, null, !nosanitize !7
br i1 %0, label %cont, label %handler.type_mismatch, !prof !8, !nosanitize !7
handler.type_mismatch: ; preds = %entry
%1 = ptrtoint %struct.awaitable* %this1 to i64, !nosanitize !7
call void @__ubsan_handle_type_mismatch_v1(i8* bitcast ({ { [12 x i8]*, i32, i32 }, { i16, i16, [14 x i8] }*, i8, i8 }* @1 to i8*), i64 %1) #5, !nosanitize !7
br label %cont, !nosanitize !7
cont: ; preds = %handler.type_mismatch, %entry
%2 = bitcast %"struct.task::promise_type"* %__promise to i8*
%3 = call token @llvm.coro.id(i32 16, i8* %2, i8* null, i8* null)
%4 = call i1 @llvm.coro.alloc(token %3)
br i1 %4, label %coro.alloc, label %coro.init
coro.alloc: ; preds = %cont
%5 = call i64 @llvm.coro.size.i64()
%call = call i8* @_Znwm(i64 %5)
br label %coro.init
coro.init: ; preds = %coro.alloc, %cont
%6 = phi i8* [ null, %cont ], [ %call, %coro.alloc ]
%7 = call i8* @llvm.coro.begin(token %3, i8* %6)
store i1 false, i1* %gro.active, align 1
%8 = bitcast %"struct.task::promise_type"* %__promise to i8*
call void @llvm.lifetime.start.p0i8(i64 1, i8* %8) #5
%9 = bitcast %"struct.task::promise_type"* %__promise to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %9, i8* align 1 getelementptr inbounds (%"struct.task::promise_type", %"struct.task::promise_type"* @_ZZN9awaitable5awaitEvE9__promise, i32 0, i32 0), i64 1, i1 false)
invoke void @_ZN4task12promise_type17get_return_objectEv(%"struct.task::promise_type"* %__promise)
to label %invoke.cont unwind label %lpad
invoke.cont: ; preds = %coro.init
store i1 true, i1* %gro.active, align 1
%10 = bitcast %"struct.std::experimental::coroutines_v1::suspend_never"* %ref.tmp to i8*
call void @llvm.lifetime.start.p0i8(i64 1, i8* %10) #5
invoke void @_ZN4task12promise_type15initial_suspendEv(%"struct.task::promise_type"* %__promise)
to label %invoke.cont3 unwind label %lpad2
invoke.cont3: ; preds = %invoke.cont
%call5 = call zeroext i1 @_ZNKSt12experimental13coroutines_v113suspend_never11await_readyEv(%"struct.std::experimental::coroutines_v1::suspend_never"* %ref.tmp) #5
br i1 %call5, label %init.ready, label %init.suspend
init.suspend: ; preds = %invoke.cont3
%11 = call token @llvm.coro.save(i8* null)
%12 = bitcast %"class.std::experimental::coroutines_v1::coroutine_handle.0"* %ref.tmp6 to i8*
call void @llvm.lifetime.start.p0i8(i64 8, i8* %12) #5
%call7 = call i8* @_ZNSt12experimental13coroutines_v116coroutine_handleIN4task12promise_typeEE12from_addressEPv(i8* %7) #5
%coerce.dive = getelementptr inbounds %"class.std::experimental::coroutines_v1::coroutine_handle.0", %"class.std::experimental::coroutines_v1::coroutine_handle.0"* %ref.tmp6, i32 0, i32 0
%coerce.dive8 = getelementptr inbounds %"class.std::experimental::coroutines_v1::coroutine_handle", %"class.std::experimental::coroutines_v1::coroutine_handle"* %coerce.dive, i32 0, i32 0
store i8* %call7, i8** %coerce.dive8, align 8
%13 = bitcast %"class.std::experimental::coroutines_v1::coroutine_handle.0"* %ref.tmp6 to %"class.std::experimental::coroutines_v1::coroutine_handle"*
%14 = bitcast %"class.std::experimental::coroutines_v1::coroutine_handle"* %agg.tmp to i8*
%15 = bitcast %"class.std::experimental::coroutines_v1::coroutine_handle"* %13 to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %14, i8* align 8 %15, i64 8, i1 false), !tbaa.struct !9
%coerce.dive9 = getelementptr inbounds %"class.std::experimental::coroutines_v1::coroutine_handle", %"class.std::experimental::coroutines_v1::coroutine_handle"* %agg.tmp, i32 0, i32 0
%16 = load i8*, i8** %coerce.dive9, align 8
call void @_ZNKSt12experimental13coroutines_v113suspend_never13await_suspendENS0_16coroutine_handleIvEE(%"struct.std::experimental::coroutines_v1::suspend_never"* %ref.tmp, i8* %16) #5
%17 = call i8 @llvm.coro.suspend(token %11, i1 false)
switch i8 %17, label %coro.ret [
i8 0, label %init.ready
i8 1, label %init.cleanup
]
init.cleanup: ; preds = %init.suspend
br label %cleanup
lpad: ; preds = %coro.init
%18 = landingpad { i8*, i32 }
cleanup
%19 = extractvalue { i8*, i32 } %18, 0
store i8* %19, i8** %exn.slot, align 8
%20 = extractvalue { i8*, i32 } %18, 1
store i32 %20, i32* %ehselector.slot, align 4
br label %ehcleanup57
lpad2: ; preds = %invoke.cont
%21 = landingpad { i8*, i32 }
cleanup
%22 = extractvalue { i8*, i32 } %21, 0
store i8* %22, i8** %exn.slot, align 8
%23 = extractvalue { i8*, i32 } %21, 1
store i32 %23, i32* %ehselector.slot, align 4
%24 = bitcast %"struct.std::experimental::coroutines_v1::suspend_never"* %ref.tmp to i8*
call void @llvm.lifetime.end.p0i8(i64 1, i8* %24) #5
br label %ehcleanup
init.ready: ; preds = %init.suspend, %invoke.cont3
call void @_ZNKSt12experimental13coroutines_v113suspend_never12await_resumeEv(%"struct.std::experimental::coroutines_v1::suspend_never"* %ref.tmp) #5
br label %cleanup
cleanup: ; preds = %init.ready, %init.cleanup
%cleanup.dest.slot.0 = phi i32 [ 0, %init.ready ], [ 2, %init.cleanup ]
%25 = bitcast %"class.std::experimental::coroutines_v1::coroutine_handle.0"* %ref.tmp6 to i8*
call void @llvm.lifetime.end.p0i8(i64 8, i8* %25) #5
%26 = bitcast %"struct.std::experimental::coroutines_v1::suspend_never"* %ref.tmp to i8*
call void @llvm.lifetime.end.p0i8(i64 1, i8* %26) #5
switch i32 %cleanup.dest.slot.0, label %cleanup56 [
i32 0, label %cleanup.cont
]
cleanup.cont: ; preds = %cleanup
%27 = icmp ne %struct.awaitable* %this1, null, !nosanitize !7
br i1 %27, label %cont12, label %handler.type_mismatch11, !prof !8, !nosanitize !7
handler.type_mismatch11: ; preds = %cleanup.cont
%28 = ptrtoint %struct.awaitable* %this1 to i64, !nosanitize !7
call void @__ubsan_handle_type_mismatch_v1(i8* bitcast ({ { [12 x i8]*, i32, i32 }, { i16, i16, [12 x i8] }*, i8, i8 }* @3 to i8*), i64 %28) #5, !nosanitize !7
br label %cont12, !nosanitize !7
cont12: ; preds = %handler.type_mismatch11, %cleanup.cont
%call15 = invoke zeroext i1 @_ZN9awaitable11await_readyEv(%struct.awaitable* %this1)
to label %invoke.cont14 unwind label %lpad13
invoke.cont14: ; preds = %cont12
br i1 %call15, label %await.ready, label %await.suspend
await.suspend: ; preds = %invoke.cont14
%29 = call token @llvm.coro.save(i8* null)
%30 = icmp ne %struct.awaitable* %this1, null, !nosanitize !7
br i1 %30, label %cont17, label %handler.type_mismatch16, !prof !8, !nosanitize !7
handler.type_mismatch16: ; preds = %await.suspend
%31 = ptrtoint %struct.awaitable* %this1 to i64, !nosanitize !7
call void @__ubsan_handle_type_mismatch_v1(i8* bitcast ({ { [12 x i8]*, i32, i32 }, { i16, i16, [12 x i8] }*, i8, i8 }* @4 to i8*), i64 %31) #5, !nosanitize !7
br label %cont17, !nosanitize !7
cont17: ; preds = %handler.type_mismatch16, %await.suspend
%32 = bitcast %"class.std::experimental::coroutines_v1::coroutine_handle.0"* %ref.tmp19 to i8*
call void @llvm.lifetime.start.p0i8(i64 8, i8* %32) #5
%call20 = call i8* @_ZNSt12experimental13coroutines_v116coroutine_handleIN4task12promise_typeEE12from_addressEPv(i8* %7) #5
%coerce.dive21 = getelementptr inbounds %"class.std::experimental::coroutines_v1::coroutine_handle.0", %"class.std::experimental::coroutines_v1::coroutine_handle.0"* %ref.tmp19, i32 0, i32 0
%coerce.dive22 = getelementptr inbounds %"class.std::experimental::coroutines_v1::coroutine_handle", %"class.std::experimental::coroutines_v1::coroutine_handle"* %coerce.dive21, i32 0, i32 0
store i8* %call20, i8** %coerce.dive22, align 8
%33 = bitcast %"class.std::experimental::coroutines_v1::coroutine_handle.0"* %ref.tmp19 to %"class.std::experimental::coroutines_v1::coroutine_handle"*
%34 = bitcast %"class.std::experimental::coroutines_v1::coroutine_handle"* %agg.tmp18 to i8*
%35 = bitcast %"class.std::experimental::coroutines_v1::coroutine_handle"* %33 to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %34, i8* align 8 %35, i64 8, i1 false), !tbaa.struct !9
%coerce.dive23 = getelementptr inbounds %"class.std::experimental::coroutines_v1::coroutine_handle", %"class.std::experimental::coroutines_v1::coroutine_handle"* %agg.tmp18, i32 0, i32 0
%36 = load i8*, i8** %coerce.dive23, align 8
%call26 = invoke zeroext i1 @_ZN9awaitable13await_suspendENSt12experimental13coroutines_v116coroutine_handleIvEE(%struct.awaitable* %this1, i8* %36)
to label %invoke.cont25 unwind label %lpad24
invoke.cont25: ; preds = %cont17
br i1 %call26, label %await.suspend.bool, label %await.ready
await.suspend.bool: ; preds = %invoke.cont25
%37 = call i8 @llvm.coro.suspend(token %29, i1 false)
switch i8 %37, label %coro.ret [
i8 0, label %await.ready
i8 1, label %await.cleanup
]
await.cleanup: ; preds = %await.suspend.bool
br label %cleanup31
lpad13: ; preds = %cleanup.cont33, %cont12
%38 = landingpad { i8*, i32 }
catch i8* null
%39 = extractvalue { i8*, i32 } %38, 0
store i8* %39, i8** %exn.slot, align 8
%40 = extractvalue { i8*, i32 } %38, 1
store i32 %40, i32* %ehselector.slot, align 4
br label %catch
lpad24: ; preds = %cont28, %cont17
%41 = landingpad { i8*, i32 }
catch i8* null
%42 = extractvalue { i8*, i32 } %41, 0
store i8* %42, i8** %exn.slot, align 8
%43 = extractvalue { i8*, i32 } %41, 1
store i32 %43, i32* %ehselector.slot, align 4
%44 = bitcast %"class.std::experimental::coroutines_v1::coroutine_handle.0"* %ref.tmp19 to i8*
call void @llvm.lifetime.end.p0i8(i64 8, i8* %44) #5
br label %catch
catch: ; preds = %lpad24, %lpad13
%exn = load i8*, i8** %exn.slot, align 8
%45 = call i8* @__cxa_begin_catch(i8* %exn) #5
invoke void @_ZN4task12promise_type19unhandled_exceptionEv(%"struct.task::promise_type"* %__promise)
to label %invoke.cont36 unwind label %lpad35
invoke.cont36: ; preds = %catch
invoke void @__cxa_end_catch()
to label %invoke.cont38 unwind label %lpad37
invoke.cont38: ; preds = %invoke.cont36
br label %try.cont
try.cont: ; preds = %invoke.cont38
br label %coro.final
coro.final: ; preds = %try.cont, %invoke.cont34
%46 = bitcast %"struct.std::experimental::coroutines_v1::suspend_never"* %ref.tmp40 to i8*
call void @llvm.lifetime.start.p0i8(i64 1, i8* %46) #5
invoke void @_ZN4task12promise_type13final_suspendEv(%"struct.task::promise_type"* %__promise)
to label %invoke.cont42 unwind label %lpad41
invoke.cont42: ; preds = %coro.final
%call44 = call zeroext i1 @_ZNKSt12experimental13coroutines_v113suspend_never11await_readyEv(%"struct.std::experimental::coroutines_v1::suspend_never"* %ref.tmp40) #5
br i1 %call44, label %final.ready, label %final.suspend
final.suspend: ; preds = %invoke.cont42
%47 = call token @llvm.coro.save(i8* null)
%48 = bitcast %"class.std::experimental::coroutines_v1::coroutine_handle.0"* %ref.tmp46 to i8*
call void @llvm.lifetime.start.p0i8(i64 8, i8* %48) #5
%call47 = call i8* @_ZNSt12experimental13coroutines_v116coroutine_handleIN4task12promise_typeEE12from_addressEPv(i8* %7) #5
%coerce.dive48 = getelementptr inbounds %"class.std::experimental::coroutines_v1::coroutine_handle.0", %"class.std::experimental::coroutines_v1::coroutine_handle.0"* %ref.tmp46, i32 0, i32 0
%coerce.dive49 = getelementptr inbounds %"class.std::experimental::coroutines_v1::coroutine_handle", %"class.std::experimental::coroutines_v1::coroutine_handle"* %coerce.dive48, i32 0, i32 0
store i8* %call47, i8** %coerce.dive49, align 8
%49 = bitcast %"class.std::experimental::coroutines_v1::coroutine_handle.0"* %ref.tmp46 to %"class.std::experimental::coroutines_v1::coroutine_handle"*
%50 = bitcast %"class.std::experimental::coroutines_v1::coroutine_handle"* %agg.tmp45 to i8*
%51 = bitcast %"class.std::experimental::coroutines_v1::coroutine_handle"* %49 to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %50, i8* align 8 %51, i64 8, i1 false), !tbaa.struct !9
%coerce.dive50 = getelementptr inbounds %"class.std::experimental::coroutines_v1::coroutine_handle", %"class.std::experimental::coroutines_v1::coroutine_handle"* %agg.tmp45, i32 0, i32 0
%52 = load i8*, i8** %coerce.dive50, align 8
call void @_ZNKSt12experimental13coroutines_v113suspend_never13await_suspendENS0_16coroutine_handleIvEE(%"struct.std::experimental::coroutines_v1::suspend_never"* %ref.tmp40, i8* %52) #5
%53 = call i8 @llvm.coro.suspend(token %47, i1 true)
switch i8 %53, label %coro.ret [
i8 0, label %final.ready
i8 1, label %final.cleanup
]
final.cleanup: ; preds = %final.suspend
br label %cleanup51
await.ready: ; preds = %await.suspend.bool, %invoke.cont25, %invoke.cont14
%54 = icmp ne %struct.awaitable* %this1, null, !nosanitize !7
br i1 %54, label %cont28, label %handler.type_mismatch27, !prof !8, !nosanitize !7
handler.type_mismatch27: ; preds = %await.ready
%55 = ptrtoint %struct.awaitable* %this1 to i64, !nosanitize !7
call void @__ubsan_handle_type_mismatch_v1(i8* bitcast ({ { [12 x i8]*, i32, i32 }, { i16, i16, [12 x i8] }*, i8, i8 }* @5 to i8*), i64 %55) #5, !nosanitize !7
br label %cont28, !nosanitize !7
cont28: ; preds = %handler.type_mismatch27, %await.ready
%call30 = invoke zeroext i1 @_ZN9awaitable12await_resumeEv(%struct.awaitable* %this1)
to label %invoke.cont29 unwind label %lpad24
invoke.cont29: ; preds = %cont28
br label %cleanup31
cleanup31: ; preds = %invoke.cont29, %await.cleanup
%cleanup.dest.slot.1 = phi i32 [ 0, %invoke.cont29 ], [ 2, %await.cleanup ]
%56 = bitcast %"class.std::experimental::coroutines_v1::coroutine_handle.0"* %ref.tmp19 to i8*
call void @llvm.lifetime.end.p0i8(i64 8, i8* %56) #5
switch i32 %cleanup.dest.slot.1, label %cleanup56 [
i32 0, label %cleanup.cont33
]
cleanup.cont33: ; preds = %cleanup31
invoke void @_ZN4task12promise_type11return_voidEv(%"struct.task::promise_type"* %__promise)
to label %invoke.cont34 unwind label %lpad13
invoke.cont34: ; preds = %cleanup.cont33
br label %coro.final
lpad35: ; preds = %catch
%57 = landingpad { i8*, i32 }
cleanup
%58 = extractvalue { i8*, i32 } %57, 0
store i8* %58, i8** %exn.slot, align 8
%59 = extractvalue { i8*, i32 } %57, 1
store i32 %59, i32* %ehselector.slot, align 4
invoke void @__cxa_end_catch()
to label %invoke.cont39 unwind label %terminate.lpad
lpad37: ; preds = %invoke.cont36
%60 = landingpad { i8*, i32 }
cleanup
%61 = extractvalue { i8*, i32 } %60, 0
store i8* %61, i8** %exn.slot, align 8
%62 = extractvalue { i8*, i32 } %60, 1
store i32 %62, i32* %ehselector.slot, align 4
br label %ehcleanup
invoke.cont39: ; preds = %lpad35
br label %ehcleanup
lpad41: ; preds = %coro.final
%63 = landingpad { i8*, i32 }
cleanup
%64 = extractvalue { i8*, i32 } %63, 0
store i8* %64, i8** %exn.slot, align 8
%65 = extractvalue { i8*, i32 } %63, 1
store i32 %65, i32* %ehselector.slot, align 4
%66 = bitcast %"struct.std::experimental::coroutines_v1::suspend_never"* %ref.tmp40 to i8*
call void @llvm.lifetime.end.p0i8(i64 1, i8* %66) #5
br label %ehcleanup
final.ready: ; preds = %final.suspend, %invoke.cont42
call void @_ZNKSt12experimental13coroutines_v113suspend_never12await_resumeEv(%"struct.std::experimental::coroutines_v1::suspend_never"* %ref.tmp40) #5
br label %cleanup51
cleanup51: ; preds = %final.ready, %final.cleanup
%cleanup.dest.slot.2 = phi i32 [ 0, %final.ready ], [ 2, %final.cleanup ]
%67 = bitcast %"class.std::experimental::coroutines_v1::coroutine_handle.0"* %ref.tmp46 to i8*
call void @llvm.lifetime.end.p0i8(i64 8, i8* %67) #5
%68 = bitcast %"struct.std::experimental::coroutines_v1::suspend_never"* %ref.tmp40 to i8*
call void @llvm.lifetime.end.p0i8(i64 1, i8* %68) #5
switch i32 %cleanup.dest.slot.2, label %cleanup56 [
i32 0, label %cleanup.cont54
]
cleanup.cont54: ; preds = %cleanup51
br label %cleanup56
cleanup56: ; preds = %cleanup.cont54, %cleanup51, %cleanup31, %cleanup
%cleanup.dest.slot.3 = phi i32 [ %cleanup.dest.slot.0, %cleanup ], [ %cleanup.dest.slot.1, %cleanup31 ], [ %cleanup.dest.slot.2, %cleanup51 ], [ 0, %cleanup.cont54 ]
%69 = bitcast %"struct.task::promise_type"* %__promise to i8*
call void @llvm.lifetime.end.p0i8(i64 1, i8* %69) #5
%70 = call i8* @llvm.coro.free(token %3, i8* %7)
%71 = icmp ne i8* %70, null
br i1 %71, label %coro.free, label %after.coro.free
coro.free: ; preds = %cleanup56
call void @_ZdlPv(i8* %70) #5
br label %after.coro.free
after.coro.free: ; preds = %cleanup56, %coro.free
switch i32 %cleanup.dest.slot.3, label %unreachable [
i32 0, label %cleanup.cont60
i32 2, label %coro.ret
]
cleanup.cont60: ; preds = %after.coro.free
br label %coro.ret
coro.ret: ; preds = %cleanup.cont60, %after.coro.free, %final.suspend, %await.suspend.bool, %init.suspend
%72 = call i1 @llvm.coro.end(i8* null, i1 false)
ret void
ehcleanup: ; preds = %lpad41, %invoke.cont39, %lpad37, %lpad2
%73 = call i1 @llvm.coro.end(i8* null, i1 true)
br i1 %73, label %eh.resume, label %cleanup.cont55
cleanup.cont55: ; preds = %ehcleanup
br label %ehcleanup57
ehcleanup57: ; preds = %cleanup.cont55, %lpad
%74 = bitcast %"struct.task::promise_type"* %__promise to i8*
call void @llvm.lifetime.end.p0i8(i64 1, i8* %74) #5
%75 = call i8* @llvm.coro.free(token %3, i8* %7)
%76 = icmp ne i8* %75, null
br i1 %76, label %coro.free62, label %after.coro.free63
coro.free62: ; preds = %ehcleanup57
call void @_ZdlPv(i8* %75) #5
br label %after.coro.free63
after.coro.free63: ; preds = %ehcleanup57, %coro.free62
br label %eh.resume
eh.resume: ; preds = %after.coro.free63, %ehcleanup
%exn64 = load i8*, i8** %exn.slot, align 8
%sel = load i32, i32* %ehselector.slot, align 4
%lpad.val = insertvalue { i8*, i32 } undef, i8* %exn64, 0
%lpad.val65 = insertvalue { i8*, i32 } %lpad.val, i32 %sel, 1
resume { i8*, i32 } %lpad.val65
terminate.lpad: ; preds = %lpad35
%77 = landingpad { i8*, i32 }
catch i8* null
%78 = extractvalue { i8*, i32 } %77, 0
call void @__clang_call_terminate(i8* %78) #13
unreachable
unreachable: ; preds = %after.coro.free
unreachable
}
; Function Attrs: argmemonly nounwind
declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #1
; Function Attrs: uwtable
declare void @__ubsan_handle_type_mismatch_v1(i8*, i64) #3
; Function Attrs: argmemonly nounwind readonly
declare token @llvm.coro.id(i32, i8* readnone, i8* nocapture readonly, i8*) #4
; Function Attrs: nounwind
declare i1 @llvm.coro.alloc(token) #5
; Function Attrs: nobuiltin
declare noalias i8* @_Znwm(i64) #6
; Function Attrs: nounwind readnone
declare i64 @llvm.coro.size.i64() #7
; Function Attrs: nounwind
declare i8* @llvm.coro.begin(token, i8* writeonly) #5
; Function Attrs: argmemonly nounwind
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture writeonly, i8* nocapture readonly, i64, i1) #1
; Function Attrs: nounwind ssp uwtable
define linkonce_odr void @_ZN4task12promise_type17get_return_objectEv(%"struct.task::promise_type"* %this) #8 align 2 {
entry:
%retval = alloca %struct.task, align 1
%this.addr = alloca %"struct.task::promise_type"*, align 8
store %"struct.task::promise_type"* %this, %"struct.task::promise_type"** %this.addr, align 8, !tbaa !3
%this1 = load %"struct.task::promise_type"*, %"struct.task::promise_type"** %this.addr, align 8
%0 = icmp ne %"struct.task::promise_type"* %this1, null, !nosanitize !7
br i1 %0, label %cont, label %handler.type_mismatch, !prof !8, !nosanitize !7
handler.type_mismatch: ; preds = %entry
%1 = ptrtoint %"struct.task::promise_type"* %this1 to i64, !nosanitize !7
call void @__ubsan_handle_type_mismatch_v1(i8* bitcast ({ { [12 x i8]*, i32, i32 }, { i16, i16, [23 x i8] }*, i8, i8 }* @7 to i8*), i64 %1) #5, !nosanitize !7
br label %cont, !nosanitize !7
cont: ; preds = %handler.type_mismatch, %entry
ret void
}
declare i32 @__gxx_personality_v0(...)
; Function Attrs: nounwind ssp uwtable
define linkonce_odr void @_ZN4task12promise_type15initial_suspendEv(%"struct.task::promise_type"* %this) #8 align 2 {
entry:
%retval = alloca %"struct.std::experimental::coroutines_v1::suspend_never", align 1
%this.addr = alloca %"struct.task::promise_type"*, align 8
store %"struct.task::promise_type"* %this, %"struct.task::promise_type"** %this.addr, align 8, !tbaa !3
%this1 = load %"struct.task::promise_type"*, %"struct.task::promise_type"** %this.addr, align 8
%0 = icmp ne %"struct.task::promise_type"* %this1, null, !nosanitize !7
br i1 %0, label %cont, label %handler.type_mismatch, !prof !8, !nosanitize !7
handler.type_mismatch: ; preds = %entry
%1 = ptrtoint %"struct.task::promise_type"* %this1 to i64, !nosanitize !7
call void @__ubsan_handle_type_mismatch_v1(i8* bitcast ({ { [12 x i8]*, i32, i32 }, { i16, i16, [23 x i8] }*, i8, i8 }* @8 to i8*), i64 %1) #5, !nosanitize !7
br label %cont, !nosanitize !7
cont: ; preds = %handler.type_mismatch, %entry
ret void
}
; Function Attrs: alwaysinline nounwind ssp uwtable
define linkonce_odr hidden zeroext i1 @_ZNKSt12experimental13coroutines_v113suspend_never11await_readyEv(%"struct.std::experimental::coroutines_v1::suspend_never"* %this) #9 align 2 {
entry:
%this.addr = alloca %"struct.std::experimental::coroutines_v1::suspend_never"*, align 8
store %"struct.std::experimental::coroutines_v1::suspend_never"* %this, %"struct.std::experimental::coroutines_v1::suspend_never"** %this.addr, align 8, !tbaa !3
%this1 = load %"struct.std::experimental::coroutines_v1::suspend_never"*, %"struct.std::experimental::coroutines_v1::suspend_never"** %this.addr, align 8
%0 = icmp ne %"struct.std::experimental::coroutines_v1::suspend_never"* %this1, null, !nosanitize !7
br i1 %0, label %cont, label %handler.type_mismatch, !prof !8, !nosanitize !7
handler.type_mismatch: ; preds = %entry
%1 = ptrtoint %"struct.std::experimental::coroutines_v1::suspend_never"* %this1 to i64, !nosanitize !7
call void @__ubsan_handle_type_mismatch_v1(i8* bitcast ({ { [77 x i8]*, i32, i32 }, { i16, i16, [58 x i8] }*, i8, i8 }* @10 to i8*), i64 %1) #5, !nosanitize !7
br label %cont, !nosanitize !7
cont: ; preds = %handler.type_mismatch, %entry
ret i1 true
}
; Function Attrs: nounwind
declare token @llvm.coro.save(i8*) #5
; Function Attrs: alwaysinline nounwind ssp uwtable
define linkonce_odr hidden void @_ZNKSt12experimental13coroutines_v113suspend_never13await_suspendENS0_16coroutine_handleIvEE(%"struct.std::experimental::coroutines_v1::suspend_never"* %this, i8* %.coerce) #9 align 2 {
entry:
%0 = alloca %"class.std::experimental::coroutines_v1::coroutine_handle", align 8
%this.addr = alloca %"struct.std::experimental::coroutines_v1::suspend_never"*, align 8
%coerce.dive = getelementptr inbounds %"class.std::experimental::coroutines_v1::coroutine_handle", %"class.std::experimental::coroutines_v1::coroutine_handle"* %0, i32 0, i32 0
store i8* %.coerce, i8** %coerce.dive, align 8
store %"struct.std::experimental::coroutines_v1::suspend_never"* %this, %"struct.std::experimental::coroutines_v1::suspend_never"** %this.addr, align 8, !tbaa !3
%this1 = load %"struct.std::experimental::coroutines_v1::suspend_never"*, %"struct.std::experimental::coroutines_v1::suspend_never"** %this.addr, align 8
%1 = icmp ne %"struct.std::experimental::coroutines_v1::suspend_never"* %this1, null, !nosanitize !7
br i1 %1, label %cont, label %handler.type_mismatch, !prof !8, !nosanitize !7
handler.type_mismatch: ; preds = %entry
%2 = ptrtoint %"struct.std::experimental::coroutines_v1::suspend_never"* %this1 to i64, !nosanitize !7
call void @__ubsan_handle_type_mismatch_v1(i8* bitcast ({ { [77 x i8]*, i32, i32 }, { i16, i16, [58 x i8] }*, i8, i8 }* @11 to i8*), i64 %2) #5, !nosanitize !7
br label %cont, !nosanitize !7
cont: ; preds = %handler.type_mismatch, %entry
ret void
}
; Function Attrs: alwaysinline nounwind ssp uwtable
define linkonce_odr hidden i8* @_ZNSt12experimental13coroutines_v116coroutine_handleIN4task12promise_typeEE12from_addressEPv(i8* %__addr) #9 align 2 {
entry:
%retval = alloca %"class.std::experimental::coroutines_v1::coroutine_handle.0", align 8
%__addr.addr = alloca i8*, align 8
store i8* %__addr, i8** %__addr.addr, align 8, !tbaa !3
call void @_ZNSt12experimental13coroutines_v116coroutine_handleIN4task12promise_typeEEC1Ev(%"class.std::experimental::coroutines_v1::coroutine_handle.0"* %retval) #5
%0 = load i8*, i8** %__addr.addr, align 8, !tbaa !3
%1 = bitcast %"class.std::experimental::coroutines_v1::coroutine_handle.0"* %retval to %"class.std::experimental::coroutines_v1::coroutine_handle"*
%__handle_ = getelementptr inbounds %"class.std::experimental::coroutines_v1::coroutine_handle", %"class.std::experimental::coroutines_v1::coroutine_handle"* %1, i32 0, i32 0
store i8* %0, i8** %__handle_, align 8, !tbaa !10
%coerce.dive = getelementptr inbounds %"class.std::experimental::coroutines_v1::coroutine_handle.0", %"class.std::experimental::coroutines_v1::coroutine_handle.0"* %retval, i32 0, i32 0
%coerce.dive1 = getelementptr inbounds %"class.std::experimental::coroutines_v1::coroutine_handle", %"class.std::experimental::coroutines_v1::coroutine_handle"* %coerce.dive, i32 0, i32 0
%2 = load i8*, i8** %coerce.dive1, align 8
ret i8* %2
}
; Function Attrs: nounwind
declare i8 @llvm.coro.suspend(token, i1) #5
; Function Attrs: alwaysinline nounwind ssp uwtable
define linkonce_odr hidden void @_ZNKSt12experimental13coroutines_v113suspend_never12await_resumeEv(%"struct.std::experimental::coroutines_v1::suspend_never"* %this) #9 align 2 {
entry:
%this.addr = alloca %"struct.std::experimental::coroutines_v1::suspend_never"*, align 8
store %"struct.std::experimental::coroutines_v1::suspend_never"* %this, %"struct.std::experimental::coroutines_v1::suspend_never"** %this.addr, align 8, !tbaa !3
%this1 = load %"struct.std::experimental::coroutines_v1::suspend_never"*, %"struct.std::experimental::coroutines_v1::suspend_never"** %this.addr, align 8
%0 = icmp ne %"struct.std::experimental::coroutines_v1::suspend_never"* %this1, null, !nosanitize !7
br i1 %0, label %cont, label %handler.type_mismatch, !prof !8, !nosanitize !7
handler.type_mismatch: ; preds = %entry
%1 = ptrtoint %"struct.std::experimental::coroutines_v1::suspend_never"* %this1 to i64, !nosanitize !7
call void @__ubsan_handle_type_mismatch_v1(i8* bitcast ({ { [77 x i8]*, i32, i32 }, { i16, i16, [58 x i8] }*, i8, i8 }* @21 to i8*), i64 %1) #5, !nosanitize !7
br label %cont, !nosanitize !7
cont: ; preds = %handler.type_mismatch, %entry
ret void
}
; Function Attrs: nounwind ssp uwtable
define linkonce_odr zeroext i1 @_ZN9awaitable11await_readyEv(%struct.awaitable* %this) #8 align 2 {
entry:
%this.addr = alloca %struct.awaitable*, align 8
store %struct.awaitable* %this, %struct.awaitable** %this.addr, align 8, !tbaa !3
%this1 = load %struct.awaitable*, %struct.awaitable** %this.addr, align 8
%0 = icmp ne %struct.awaitable* %this1, null, !nosanitize !7
br i1 %0, label %cont, label %handler.type_mismatch, !prof !8, !nosanitize !7
handler.type_mismatch: ; preds = %entry
%1 = ptrtoint %struct.awaitable* %this1 to i64, !nosanitize !7
call void @__ubsan_handle_type_mismatch_v1(i8* bitcast ({ { [12 x i8]*, i32, i32 }, { i16, i16, [14 x i8] }*, i8, i8 }* @22 to i8*), i64 %1) #5, !nosanitize !7
br label %cont, !nosanitize !7
cont: ; preds = %handler.type_mismatch, %entry
ret i1 false
}
; Function Attrs: nounwind ssp uwtable
define linkonce_odr zeroext i1 @_ZN9awaitable13await_suspendENSt12experimental13coroutines_v116coroutine_handleIvEE(%struct.awaitable* %this, i8* %awaiter.coerce) #8 align 2 {
entry:
%awaiter = alloca %"class.std::experimental::coroutines_v1::coroutine_handle", align 8
%this.addr = alloca %struct.awaitable*, align 8
%coerce.dive = getelementptr inbounds %"class.std::experimental::coroutines_v1::coroutine_handle", %"class.std::experimental::coroutines_v1::coroutine_handle"* %awaiter, i32 0, i32 0
store i8* %awaiter.coerce, i8** %coerce.dive, align 8
store %struct.awaitable* %this, %struct.awaitable** %this.addr, align 8, !tbaa !3
%this1 = load %struct.awaitable*, %struct.awaitable** %this.addr, align 8
%0 = icmp ne %struct.awaitable* %this1, null, !nosanitize !7
br i1 %0, label %cont, label %handler.type_mismatch, !prof !8, !nosanitize !7
handler.type_mismatch: ; preds = %entry
%1 = ptrtoint %struct.awaitable* %this1 to i64, !nosanitize !7
call void @__ubsan_handle_type_mismatch_v1(i8* bitcast ({ { [12 x i8]*, i32, i32 }, { i16, i16, [14 x i8] }*, i8, i8 }* @23 to i8*), i64 %1) #5, !nosanitize !7
br label %cont, !nosanitize !7
cont: ; preds = %handler.type_mismatch, %entry
ret i1 false
}
; Function Attrs: nounwind ssp uwtable
define linkonce_odr zeroext i1 @_ZN9awaitable12await_resumeEv(%struct.awaitable* %this) #8 align 2 {
entry:
%this.addr = alloca %struct.awaitable*, align 8
store %struct.awaitable* %this, %struct.awaitable** %this.addr, align 8, !tbaa !3
%this1 = load %struct.awaitable*, %struct.awaitable** %this.addr, align 8
%0 = icmp ne %struct.awaitable* %this1, null, !nosanitize !7
br i1 %0, label %cont, label %handler.type_mismatch, !prof !8, !nosanitize !7
handler.type_mismatch: ; preds = %entry
%1 = ptrtoint %struct.awaitable* %this1 to i64, !nosanitize !7
call void @__ubsan_handle_type_mismatch_v1(i8* bitcast ({ { [12 x i8]*, i32, i32 }, { i16, i16, [14 x i8] }*, i8, i8 }* @24 to i8*), i64 %1) #5, !nosanitize !7
br label %cont, !nosanitize !7
cont: ; preds = %handler.type_mismatch, %entry
ret i1 false
}
; Function Attrs: nounwind ssp uwtable
define linkonce_odr void @_ZN4task12promise_type11return_voidEv(%"struct.task::promise_type"* %this) #8 align 2 {
entry:
%this.addr = alloca %"struct.task::promise_type"*, align 8
store %"struct.task::promise_type"* %this, %"struct.task::promise_type"** %this.addr, align 8, !tbaa !3
%this1 = load %"struct.task::promise_type"*, %"struct.task::promise_type"** %this.addr, align 8
%0 = icmp ne %"struct.task::promise_type"* %this1, null, !nosanitize !7
br i1 %0, label %cont, label %handler.type_mismatch, !prof !8, !nosanitize !7
handler.type_mismatch: ; preds = %entry
%1 = ptrtoint %"struct.task::promise_type"* %this1 to i64, !nosanitize !7
call void @__ubsan_handle_type_mismatch_v1(i8* bitcast ({ { [12 x i8]*, i32, i32 }, { i16, i16, [23 x i8] }*, i8, i8 }* @25 to i8*), i64 %1) #5, !nosanitize !7
br label %cont, !nosanitize !7
cont: ; preds = %handler.type_mismatch, %entry
ret void
}
declare i8* @__cxa_begin_catch(i8*)
; Function Attrs: nounwind ssp uwtable
define linkonce_odr void @_ZN4task12promise_type19unhandled_exceptionEv(%"struct.task::promise_type"* %this) #8 align 2 {
entry:
%this.addr = alloca %"struct.task::promise_type"*, align 8
store %"struct.task::promise_type"* %this, %"struct.task::promise_type"** %this.addr, align 8, !tbaa !3
%this1 = load %"struct.task::promise_type"*, %"struct.task::promise_type"** %this.addr, align 8
%0 = icmp ne %"struct.task::promise_type"* %this1, null, !nosanitize !7
br i1 %0, label %cont, label %handler.type_mismatch, !prof !8, !nosanitize !7
handler.type_mismatch: ; preds = %entry
%1 = ptrtoint %"struct.task::promise_type"* %this1 to i64, !nosanitize !7
call void @__ubsan_handle_type_mismatch_v1(i8* bitcast ({ { [12 x i8]*, i32, i32 }, { i16, i16, [23 x i8] }*, i8, i8 }* @26 to i8*), i64 %1) #5, !nosanitize !7
br label %cont, !nosanitize !7
cont: ; preds = %handler.type_mismatch, %entry
ret void
}
declare void @__cxa_end_catch()
; Function Attrs: noinline noreturn nounwind
define linkonce_odr hidden void @__clang_call_terminate(i8*) #10 {
%2 = call i8* @__cxa_begin_catch(i8* %0) #5
call void @_ZSt9terminatev() #13
unreachable
}
declare void @_ZSt9terminatev()
; Function Attrs: nounwind ssp uwtable
define linkonce_odr void @_ZN4task12promise_type13final_suspendEv(%"struct.task::promise_type"* %this) #8 align 2 {
entry:
%retval = alloca %"struct.std::experimental::coroutines_v1::suspend_never", align 1
%this.addr = alloca %"struct.task::promise_type"*, align 8
store %"struct.task::promise_type"* %this, %"struct.task::promise_type"** %this.addr, align 8, !tbaa !3
%this1 = load %"struct.task::promise_type"*, %"struct.task::promise_type"** %this.addr, align 8
%0 = icmp ne %"struct.task::promise_type"* %this1, null, !nosanitize !7
br i1 %0, label %cont, label %handler.type_mismatch, !prof !8, !nosanitize !7
handler.type_mismatch: ; preds = %entry
%1 = ptrtoint %"struct.task::promise_type"* %this1 to i64, !nosanitize !7
call void @__ubsan_handle_type_mismatch_v1(i8* bitcast ({ { [12 x i8]*, i32, i32 }, { i16, i16, [23 x i8] }*, i8, i8 }* @27 to i8*), i64 %1) #5, !nosanitize !7
br label %cont, !nosanitize !7
cont: ; preds = %handler.type_mismatch, %entry
ret void
}
; Function Attrs: nounwind
declare i1 @llvm.coro.end(i8*, i1) #5
; Function Attrs: nobuiltin nounwind
declare void @_ZdlPv(i8*) #11
; Function Attrs: argmemonly nounwind readonly
declare i8* @llvm.coro.free(token, i8* nocapture readonly) #4
; Function Attrs: inlinehint nounwind ssp uwtable
define linkonce_odr void @_ZNSt12experimental13coroutines_v116coroutine_handleIN4task12promise_typeEEC1Ev(%"class.std::experimental::coroutines_v1::coroutine_handle.0"* %this) unnamed_addr #12 align 2 {
entry:
%this.addr = alloca %"class.std::experimental::coroutines_v1::coroutine_handle.0"*, align 8
store %"class.std::experimental::coroutines_v1::coroutine_handle.0"* %this, %"class.std::experimental::coroutines_v1::coroutine_handle.0"** %this.addr, align 8, !tbaa !3
%this1 = load %"class.std::experimental::coroutines_v1::coroutine_handle.0"*, %"class.std::experimental::coroutines_v1::coroutine_handle.0"** %this.addr, align 8
%0 = icmp ne %"class.std::experimental::coroutines_v1::coroutine_handle.0"* %this1, null, !nosanitize !7
br i1 %0, label %cont, label %handler.type_mismatch, !prof !8, !nosanitize !7
handler.type_mismatch: ; preds = %entry
%1 = ptrtoint %"class.std::experimental::coroutines_v1::coroutine_handle.0"* %this1 to i64, !nosanitize !7
call void @__ubsan_handle_type_mismatch_v1(i8* bitcast ({ { [77 x i8]*, i32, i32 }, { i16, i16, [75 x i8] }*, i8, i8 }* @13 to i8*), i64 %1) #5, !nosanitize !7
br label %cont, !nosanitize !7
cont: ; preds = %handler.type_mismatch, %entry
%2 = icmp ne %"class.std::experimental::coroutines_v1::coroutine_handle.0"* %this1, null, !nosanitize !7
br i1 %2, label %cont3, label %handler.type_mismatch2, !prof !8, !nosanitize !7
handler.type_mismatch2: ; preds = %cont
%3 = ptrtoint %"class.std::experimental::coroutines_v1::coroutine_handle.0"* %this1 to i64, !nosanitize !7
call void @__ubsan_handle_type_mismatch_v1(i8* bitcast ({ { i8*, i32, i32 }, { i16, i16, [73 x i8] }*, i8, i8 }* @15 to i8*), i64 %3) #5, !nosanitize !7
br label %cont3, !nosanitize !7
cont3: ; preds = %handler.type_mismatch2, %cont
call void @_ZNSt12experimental13coroutines_v116coroutine_handleIN4task12promise_typeEEC2Ev(%"class.std::experimental::coroutines_v1::coroutine_handle.0"* %this1) #5
ret void
}
; Function Attrs: inlinehint nounwind ssp uwtable
define linkonce_odr void @_ZNSt12experimental13coroutines_v116coroutine_handleIN4task12promise_typeEEC2Ev(%"class.std::experimental::coroutines_v1::coroutine_handle.0"* %this) unnamed_addr #12 align 2 {
entry:
%this.addr = alloca %"class.std::experimental::coroutines_v1::coroutine_handle.0"*, align 8
store %"class.std::experimental::coroutines_v1::coroutine_handle.0"* %this, %"class.std::experimental::coroutines_v1::coroutine_handle.0"** %this.addr, align 8, !tbaa !3
%this1 = load %"class.std::experimental::coroutines_v1::coroutine_handle.0"*, %"class.std::experimental::coroutines_v1::coroutine_handle.0"** %this.addr, align 8
%0 = icmp ne %"class.std::experimental::coroutines_v1::coroutine_handle.0"* %this1, null, !nosanitize !7
br i1 %0, label %cont, label %handler.type_mismatch, !prof !8, !nosanitize !7
handler.type_mismatch: ; preds = %entry
%1 = ptrtoint %"class.std::experimental::coroutines_v1::coroutine_handle.0"* %this1 to i64, !nosanitize !7
call void @__ubsan_handle_type_mismatch_v1(i8* bitcast ({ { [77 x i8]*, i32, i32 }, { i16, i16, [75 x i8] }*, i8, i8 }* @16 to i8*), i64 %1) #5, !nosanitize !7
br label %cont, !nosanitize !7
cont: ; preds = %handler.type_mismatch, %entry
%2 = bitcast %"class.std::experimental::coroutines_v1::coroutine_handle.0"* %this1 to %"class.std::experimental::coroutines_v1::coroutine_handle"*
%3 = icmp ne %"class.std::experimental::coroutines_v1::coroutine_handle"* %2, null, !nosanitize !7
br i1 %3, label %cont3, label %handler.type_mismatch2, !prof !8, !nosanitize !7
handler.type_mismatch2: ; preds = %cont
%4 = ptrtoint %"class.std::experimental::coroutines_v1::coroutine_handle"* %2 to i64, !nosanitize !7
call void @__ubsan_handle_type_mismatch_v1(i8* bitcast ({ { i8*, i32, i32 }, { i16, i16, [59 x i8] }*, i8, i8 }* @18 to i8*), i64 %4) #5, !nosanitize !7
br label %cont3, !nosanitize !7
cont3: ; preds = %handler.type_mismatch2, %cont
call void @_ZNSt12experimental13coroutines_v116coroutine_handleIvEC2Ev(%"class.std::experimental::coroutines_v1::coroutine_handle"* %2) #5
ret void
}
; Function Attrs: alwaysinline nounwind ssp uwtable
define linkonce_odr hidden void @_ZNSt12experimental13coroutines_v116coroutine_handleIvEC2Ev(%"class.std::experimental::coroutines_v1::coroutine_handle"* %this) unnamed_addr #9 align 2 {
entry:
%this.addr = alloca %"class.std::experimental::coroutines_v1::coroutine_handle"*, align 8
store %"class.std::experimental::coroutines_v1::coroutine_handle"* %this, %"class.std::experimental::coroutines_v1::coroutine_handle"** %this.addr, align 8, !tbaa !3
%this1 = load %"class.std::experimental::coroutines_v1::coroutine_handle"*, %"class.std::experimental::coroutines_v1::coroutine_handle"** %this.addr, align 8
%0 = icmp ne %"class.std::experimental::coroutines_v1::coroutine_handle"* %this1, null, !nosanitize !7
br i1 %0, label %cont, label %handler.type_mismatch, !prof !8, !nosanitize !7
handler.type_mismatch: ; preds = %entry
%1 = ptrtoint %"class.std::experimental::coroutines_v1::coroutine_handle"* %this1 to i64, !nosanitize !7
call void @__ubsan_handle_type_mismatch_v1(i8* bitcast ({ { [77 x i8]*, i32, i32 }, { i16, i16, [61 x i8] }*, i8, i8 }* @20 to i8*), i64 %1) #5, !nosanitize !7
br label %cont, !nosanitize !7
cont: ; preds = %handler.type_mismatch, %entry
%__handle_ = getelementptr inbounds %"class.std::experimental::coroutines_v1::coroutine_handle", %"class.std::experimental::coroutines_v1::coroutine_handle"* %this1, i32 0, i32 0
store i8* null, i8** %__handle_, align 8, !tbaa !10
ret void
}
attributes #0 = { norecurse ssp uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="penryn" "target-features"="+cx16,+fxsr,+mmx,+sahf,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #1 = { argmemonly nounwind }
attributes #2 = { ssp uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="penryn" "target-features"="+cx16,+fxsr,+mmx,+sahf,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #3 = { uwtable }
attributes #4 = { argmemonly nounwind readonly }
attributes #5 = { nounwind }
attributes #6 = { nobuiltin "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="penryn" "target-features"="+cx16,+fxsr,+mmx,+sahf,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #7 = { nounwind readnone }
attributes #8 = { nounwind ssp uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="penryn" "target-features"="+cx16,+fxsr,+mmx,+sahf,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #9 = { alwaysinline nounwind ssp uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="penryn" "target-features"="+cx16,+fxsr,+mmx,+sahf,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #10 = { noinline noreturn nounwind }
attributes #11 = { nobuiltin nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="penryn" "target-features"="+cx16,+fxsr,+mmx,+sahf,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #12 = { inlinehint nounwind ssp uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="penryn" "target-features"="+cx16,+fxsr,+mmx,+sahf,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #13 = { noreturn nounwind }
!llvm.module.flags = !{!0, !1}
!llvm.ident = !{!2}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 7, !"PIC Level", i32 2}
!2 = !{!"clang version 7.0.0 (http://llvm.org/git/clang.git 75ec747077d46ed5c15d28b06981d5291159d7b2) (https://git.llvm.org/git/llvm.git/ 5fbee8fcb1fbb0940548229a160a8e13179c4cb2)"}
!3 = !{!4, !4, i64 0}
!4 = !{!"any pointer", !5, i64 0}
!5 = !{!"omnipotent char", !6, i64 0}
!6 = !{!"Simple C++ TBAA"}
!7 = !{}
!8 = !{!"branch_weights", i32 1048575, i32 1}
!9 = !{i64 0, i64 8, !3}
!10 = !{!11, !4, i64 0}
!11 = !{!"_ZTSNSt12experimental13coroutines_v116coroutine_handleIvEE", !4, i64 0}
; ModuleID = 'PR36578.cpp'
source_filename = "PR36578.cpp"
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.13.0"
%"struct.task::promise_type" = type { i8 }
%struct.awaitable = type { i8 }
%struct.task = type { i8 }
%"struct.std::experimental::coroutines_v1::suspend_never" = type { i8 }
%"class.std::experimental::coroutines_v1::coroutine_handle" = type { i8* }
%"class.std::experimental::coroutines_v1::coroutine_handle.0" = type { %"class.std::experimental::coroutines_v1::coroutine_handle" }
@_ZZN9awaitable5awaitEvE9__promise = private unnamed_addr constant %"struct.task::promise_type" undef, align 1
; Function Attrs: norecurse ssp uwtable
define i32 @main() #0 {
entry:
%a = alloca %struct.awaitable, align 1
%undef.agg.tmp = alloca %struct.task, align 1
%0 = bitcast %struct.awaitable* %a to i8*
call void @llvm.lifetime.start.p0i8(i64 1, i8* %0) #4
call void @_ZN9awaitable5awaitEv(%struct.awaitable* %a)
%1 = bitcast %struct.awaitable* %a to i8*
call void @llvm.lifetime.end.p0i8(i64 1, i8* %1) #4
ret i32 0
}
; Function Attrs: argmemonly nounwind
declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #1
; Function Attrs: ssp uwtable
define linkonce_odr void @_ZN9awaitable5awaitEv(%struct.awaitable* %this) #2 align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%retval = alloca %struct.task, align 1
%this.addr = alloca %struct.awaitable*, align 8
%gro.active = alloca i1, align 1
%__promise = alloca %"struct.task::promise_type", align 1
%exn.slot = alloca i8*
%ehselector.slot = alloca i32
%undef.agg.tmp = alloca %struct.task, align 1
%ref.tmp = alloca %"struct.std::experimental::coroutines_v1::suspend_never", align 1
%undef.agg.tmp4 = alloca %"struct.std::experimental::coroutines_v1::suspend_never", align 1
%agg.tmp = alloca %"class.std::experimental::coroutines_v1::coroutine_handle", align 8
%ref.tmp6 = alloca %"class.std::experimental::coroutines_v1::coroutine_handle.0", align 8
%agg.tmp14 = alloca %"class.std::experimental::coroutines_v1::coroutine_handle", align 8
%ref.tmp15 = alloca %"class.std::experimental::coroutines_v1::coroutine_handle.0", align 8
%ref.tmp34 = alloca %"struct.std::experimental::coroutines_v1::suspend_never", align 1
%undef.agg.tmp37 = alloca %"struct.std::experimental::coroutines_v1::suspend_never", align 1
%agg.tmp39 = alloca %"class.std::experimental::coroutines_v1::coroutine_handle", align 8
%ref.tmp40 = alloca %"class.std::experimental::coroutines_v1::coroutine_handle.0", align 8
store %struct.awaitable* %this, %struct.awaitable** %this.addr, align 8, !tbaa !3
%this1 = load %struct.awaitable*, %struct.awaitable** %this.addr, align 8
%0 = bitcast %"struct.task::promise_type"* %__promise to i8*
%1 = call token @llvm.coro.id(i32 16, i8* %0, i8* null, i8* null)
%2 = call i1 @llvm.coro.alloc(token %1)
br i1 %2, label %coro.alloc, label %coro.init
coro.alloc: ; preds = %entry
%3 = call i64 @llvm.coro.size.i64()
%call = call i8* @_Znwm(i64 %3)
br label %coro.init
coro.init: ; preds = %coro.alloc, %entry
%4 = phi i8* [ null, %entry ], [ %call, %coro.alloc ]
%5 = call i8* @llvm.coro.begin(token %1, i8* %4)
store i1 false, i1* %gro.active, align 1
%6 = bitcast %"struct.task::promise_type"* %__promise to i8*
call void @llvm.lifetime.start.p0i8(i64 1, i8* %6) #4
%7 = bitcast %"struct.task::promise_type"* %__promise to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %7, i8* align 1 getelementptr inbounds (%"struct.task::promise_type", %"struct.task::promise_type"* @_ZZN9awaitable5awaitEvE9__promise, i32 0, i32 0), i64 1, i1 false)
invoke void @_ZN4task12promise_type17get_return_objectEv(%"struct.task::promise_type"* %__promise)
to label %invoke.cont unwind label %lpad
invoke.cont: ; preds = %coro.init
store i1 true, i1* %gro.active, align 1
%8 = bitcast %"struct.std::experimental::coroutines_v1::suspend_never"* %ref.tmp to i8*
call void @llvm.lifetime.start.p0i8(i64 1, i8* %8) #4
invoke void @_ZN4task12promise_type15initial_suspendEv(%"struct.task::promise_type"* %__promise)
to label %invoke.cont3 unwind label %lpad2
invoke.cont3: ; preds = %invoke.cont
%call5 = call zeroext i1 @_ZNKSt12experimental13coroutines_v113suspend_never11await_readyEv(%"struct.std::experimental::coroutines_v1::suspend_never"* %ref.tmp) #4
br i1 %call5, label %init.ready, label %init.suspend
init.suspend: ; preds = %invoke.cont3
%9 = call token @llvm.coro.save(i8* null)
%10 = bitcast %"class.std::experimental::coroutines_v1::coroutine_handle.0"* %ref.tmp6 to i8*
call void @llvm.lifetime.start.p0i8(i64 8, i8* %10) #4
%call7 = call i8* @_ZNSt12experimental13coroutines_v116coroutine_handleIN4task12promise_typeEE12from_addressEPv(i8* %5) #4
%coerce.dive = getelementptr inbounds %"class.std::experimental::coroutines_v1::coroutine_handle.0", %"class.std::experimental::coroutines_v1::coroutine_handle.0"* %ref.tmp6, i32 0, i32 0
%coerce.dive8 = getelementptr inbounds %"class.std::experimental::coroutines_v1::coroutine_handle", %"class.std::experimental::coroutines_v1::coroutine_handle"* %coerce.dive, i32 0, i32 0
store i8* %call7, i8** %coerce.dive8, align 8
%11 = bitcast %"class.std::experimental::coroutines_v1::coroutine_handle.0"* %ref.tmp6 to %"class.std::experimental::coroutines_v1::coroutine_handle"*
%12 = bitcast %"class.std::experimental::coroutines_v1::coroutine_handle"* %agg.tmp to i8*
%13 = bitcast %"class.std::experimental::coroutines_v1::coroutine_handle"* %11 to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %12, i8* align 8 %13, i64 8, i1 false), !tbaa.struct !7
%coerce.dive9 = getelementptr inbounds %"class.std::experimental::coroutines_v1::coroutine_handle", %"class.std::experimental::coroutines_v1::coroutine_handle"* %agg.tmp, i32 0, i32 0
%14 = load i8*, i8** %coerce.dive9, align 8
call void @_ZNKSt12experimental13coroutines_v113suspend_never13await_suspendENS0_16coroutine_handleIvEE(%"struct.std::experimental::coroutines_v1::suspend_never"* %ref.tmp, i8* %14) #4
%15 = call i8 @llvm.coro.suspend(token %9, i1 false)
switch i8 %15, label %coro.ret [
i8 0, label %init.ready
i8 1, label %init.cleanup
]
init.cleanup: ; preds = %init.suspend
br label %cleanup
lpad: ; preds = %coro.init
%16 = landingpad { i8*, i32 }
cleanup
%17 = extractvalue { i8*, i32 } %16, 0
store i8* %17, i8** %exn.slot, align 8
%18 = extractvalue { i8*, i32 } %16, 1
store i32 %18, i32* %ehselector.slot, align 4
br label %ehcleanup51
lpad2: ; preds = %invoke.cont
%19 = landingpad { i8*, i32 }
cleanup
%20 = extractvalue { i8*, i32 } %19, 0
store i8* %20, i8** %exn.slot, align 8
%21 = extractvalue { i8*, i32 } %19, 1
store i32 %21, i32* %ehselector.slot, align 4
%22 = bitcast %"struct.std::experimental::coroutines_v1::suspend_never"* %ref.tmp to i8*
call void @llvm.lifetime.end.p0i8(i64 1, i8* %22) #4
br label %ehcleanup
init.ready: ; preds = %init.suspend, %invoke.cont3
call void @_ZNKSt12experimental13coroutines_v113suspend_never12await_resumeEv(%"struct.std::experimental::coroutines_v1::suspend_never"* %ref.tmp) #4
br label %cleanup
cleanup: ; preds = %init.ready, %init.cleanup
%cleanup.dest.slot.0 = phi i32 [ 0, %init.ready ], [ 2, %init.cleanup ]
%23 = bitcast %"class.std::experimental::coroutines_v1::coroutine_handle.0"* %ref.tmp6 to i8*
call void @llvm.lifetime.end.p0i8(i64 8, i8* %23) #4
%24 = bitcast %"struct.std::experimental::coroutines_v1::suspend_never"* %ref.tmp to i8*
call void @llvm.lifetime.end.p0i8(i64 1, i8* %24) #4
switch i32 %cleanup.dest.slot.0, label %cleanup50 [
i32 0, label %cleanup.cont
]
cleanup.cont: ; preds = %cleanup
%call13 = invoke zeroext i1 @_ZN9awaitable11await_readyEv(%struct.awaitable* %this1)
to label %invoke.cont12 unwind label %lpad11
invoke.cont12: ; preds = %cleanup.cont
br i1 %call13, label %await.ready, label %await.suspend
await.suspend: ; preds = %invoke.cont12
%25 = call token @llvm.coro.save(i8* null)
%26 = bitcast %"class.std::experimental::coroutines_v1::coroutine_handle.0"* %ref.tmp15 to i8*
call void @llvm.lifetime.start.p0i8(i64 8, i8* %26) #4
%call16 = call i8* @_ZNSt12experimental13coroutines_v116coroutine_handleIN4task12promise_typeEE12from_addressEPv(i8* %5) #4
%coerce.dive17 = getelementptr inbounds %"class.std::experimental::coroutines_v1::coroutine_handle.0", %"class.std::experimental::coroutines_v1::coroutine_handle.0"* %ref.tmp15, i32 0, i32 0
%coerce.dive18 = getelementptr inbounds %"class.std::experimental::coroutines_v1::coroutine_handle", %"class.std::experimental::coroutines_v1::coroutine_handle"* %coerce.dive17, i32 0, i32 0
store i8* %call16, i8** %coerce.dive18, align 8
%27 = bitcast %"class.std::experimental::coroutines_v1::coroutine_handle.0"* %ref.tmp15 to %"class.std::experimental::coroutines_v1::coroutine_handle"*
%28 = bitcast %"class.std::experimental::coroutines_v1::coroutine_handle"* %agg.tmp14 to i8*
%29 = bitcast %"class.std::experimental::coroutines_v1::coroutine_handle"* %27 to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %28, i8* align 8 %29, i64 8, i1 false), !tbaa.struct !7
%coerce.dive19 = getelementptr inbounds %"class.std::experimental::coroutines_v1::coroutine_handle", %"class.std::experimental::coroutines_v1::coroutine_handle"* %agg.tmp14, i32 0, i32 0
%30 = load i8*, i8** %coerce.dive19, align 8
%call22 = invoke zeroext i1 @_ZN9awaitable13await_suspendENSt12experimental13coroutines_v116coroutine_handleIvEE(%struct.awaitable* %this1, i8* %30)
to label %invoke.cont21 unwind label %lpad20
invoke.cont21: ; preds = %await.suspend
br i1 %call22, label %await.suspend.bool, label %await.ready
await.suspend.bool: ; preds = %invoke.cont21
%31 = call i8 @llvm.coro.suspend(token %25, i1 false)
switch i8 %31, label %coro.ret [
i8 0, label %await.ready
i8 1, label %await.cleanup
]
await.cleanup: ; preds = %await.suspend.bool
br label %cleanup25
lpad11: ; preds = %cleanup.cont27, %cleanup.cont
%32 = landingpad { i8*, i32 }
catch i8* null
%33 = extractvalue { i8*, i32 } %32, 0
store i8* %33, i8** %exn.slot, align 8
%34 = extractvalue { i8*, i32 } %32, 1
store i32 %34, i32* %ehselector.slot, align 4
br label %catch
lpad20: ; preds = %await.ready, %await.suspend
%35 = landingpad { i8*, i32 }
catch i8* null
%36 = extractvalue { i8*, i32 } %35, 0
store i8* %36, i8** %exn.slot, align 8
%37 = extractvalue { i8*, i32 } %35, 1
store i32 %37, i32* %ehselector.slot, align 4
%38 = bitcast %"class.std::experimental::coroutines_v1::coroutine_handle.0"* %ref.tmp15 to i8*
call void @llvm.lifetime.end.p0i8(i64 8, i8* %38) #4
br label %catch
catch: ; preds = %lpad20, %lpad11
%exn = load i8*, i8** %exn.slot, align 8
%39 = call i8* @__cxa_begin_catch(i8* %exn) #4
invoke void @_ZN4task12promise_type19unhandled_exceptionEv(%"struct.task::promise_type"* %__promise)
to label %invoke.cont30 unwind label %lpad29
invoke.cont30: ; preds = %catch
invoke void @__cxa_end_catch()
to label %invoke.cont32 unwind label %lpad31
invoke.cont32: ; preds = %invoke.cont30
br label %try.cont
try.cont: ; preds = %invoke.cont32
br label %coro.final
coro.final: ; preds = %try.cont, %invoke.cont28
%40 = bitcast %"struct.std::experimental::coroutines_v1::suspend_never"* %ref.tmp34 to i8*
call void @llvm.lifetime.start.p0i8(i64 1, i8* %40) #4
invoke void @_ZN4task12promise_type13final_suspendEv(%"struct.task::promise_type"* %__promise)
to label %invoke.cont36 unwind label %lpad35
invoke.cont36: ; preds = %coro.final
%call38 = call zeroext i1 @_ZNKSt12experimental13coroutines_v113suspend_never11await_readyEv(%"struct.std::experimental::coroutines_v1::suspend_never"* %ref.tmp34) #4
br i1 %call38, label %final.ready, label %final.suspend
final.suspend: ; preds = %invoke.cont36
%41 = call token @llvm.coro.save(i8* null)
%42 = bitcast %"class.std::experimental::coroutines_v1::coroutine_handle.0"* %ref.tmp40 to i8*
call void @llvm.lifetime.start.p0i8(i64 8, i8* %42) #4
%call41 = call i8* @_ZNSt12experimental13coroutines_v116coroutine_handleIN4task12promise_typeEE12from_addressEPv(i8* %5) #4
%coerce.dive42 = getelementptr inbounds %"class.std::experimental::coroutines_v1::coroutine_handle.0", %"class.std::experimental::coroutines_v1::coroutine_handle.0"* %ref.tmp40, i32 0, i32 0
%coerce.dive43 = getelementptr inbounds %"class.std::experimental::coroutines_v1::coroutine_handle", %"class.std::experimental::coroutines_v1::coroutine_handle"* %coerce.dive42, i32 0, i32 0
store i8* %call41, i8** %coerce.dive43, align 8
%43 = bitcast %"class.std::experimental::coroutines_v1::coroutine_handle.0"* %ref.tmp40 to %"class.std::experimental::coroutines_v1::coroutine_handle"*
%44 = bitcast %"class.std::experimental::coroutines_v1::coroutine_handle"* %agg.tmp39 to i8*
%45 = bitcast %"class.std::experimental::coroutines_v1::coroutine_handle"* %43 to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %44, i8* align 8 %45, i64 8, i1 false), !tbaa.struct !7
%coerce.dive44 = getelementptr inbounds %"class.std::experimental::coroutines_v1::coroutine_handle", %"class.std::experimental::coroutines_v1::coroutine_handle"* %agg.tmp39, i32 0, i32 0
%46 = load i8*, i8** %coerce.dive44, align 8
call void @_ZNKSt12experimental13coroutines_v113suspend_never13await_suspendENS0_16coroutine_handleIvEE(%"struct.std::experimental::coroutines_v1::suspend_never"* %ref.tmp34, i8* %46) #4
%47 = call i8 @llvm.coro.suspend(token %41, i1 true)
switch i8 %47, label %coro.ret [
i8 0, label %final.ready
i8 1, label %final.cleanup
]
final.cleanup: ; preds = %final.suspend
br label %cleanup45
await.ready: ; preds = %await.suspend.bool, %invoke.cont21, %invoke.cont12
%call24 = invoke zeroext i1 @_ZN9awaitable12await_resumeEv(%struct.awaitable* %this1)
to label %invoke.cont23 unwind label %lpad20
invoke.cont23: ; preds = %await.ready
br label %cleanup25
cleanup25: ; preds = %invoke.cont23, %await.cleanup
%cleanup.dest.slot.1 = phi i32 [ 0, %invoke.cont23 ], [ 2, %await.cleanup ]
%48 = bitcast %"class.std::experimental::coroutines_v1::coroutine_handle.0"* %ref.tmp15 to i8*
call void @llvm.lifetime.end.p0i8(i64 8, i8* %48) #4
switch i32 %cleanup.dest.slot.1, label %cleanup50 [
i32 0, label %cleanup.cont27
]
cleanup.cont27: ; preds = %cleanup25
invoke void @_ZN4task12promise_type11return_voidEv(%"struct.task::promise_type"* %__promise)
to label %invoke.cont28 unwind label %lpad11
invoke.cont28: ; preds = %cleanup.cont27
br label %coro.final
lpad29: ; preds = %catch
%49 = landingpad { i8*, i32 }
cleanup
%50 = extractvalue { i8*, i32 } %49, 0
store i8* %50, i8** %exn.slot, align 8
%51 = extractvalue { i8*, i32 } %49, 1
store i32 %51, i32* %ehselector.slot, align 4
invoke void @__cxa_end_catch()
to label %invoke.cont33 unwind label %terminate.lpad
lpad31: ; preds = %invoke.cont30
%52 = landingpad { i8*, i32 }
cleanup
%53 = extractvalue { i8*, i32 } %52, 0
store i8* %53, i8** %exn.slot, align 8
%54 = extractvalue { i8*, i32 } %52, 1
store i32 %54, i32* %ehselector.slot, align 4
br label %ehcleanup
invoke.cont33: ; preds = %lpad29
br label %ehcleanup
lpad35: ; preds = %coro.final
%55 = landingpad { i8*, i32 }
cleanup
%56 = extractvalue { i8*, i32 } %55, 0
store i8* %56, i8** %exn.slot, align 8
%57 = extractvalue { i8*, i32 } %55, 1
store i32 %57, i32* %ehselector.slot, align 4
%58 = bitcast %"struct.std::experimental::coroutines_v1::suspend_never"* %ref.tmp34 to i8*
call void @llvm.lifetime.end.p0i8(i64 1, i8* %58) #4
br label %ehcleanup
final.ready: ; preds = %final.suspend, %invoke.cont36
call void @_ZNKSt12experimental13coroutines_v113suspend_never12await_resumeEv(%"struct.std::experimental::coroutines_v1::suspend_never"* %ref.tmp34) #4
br label %cleanup45
cleanup45: ; preds = %final.ready, %final.cleanup
%cleanup.dest.slot.2 = phi i32 [ 0, %final.ready ], [ 2, %final.cleanup ]
%59 = bitcast %"class.std::experimental::coroutines_v1::coroutine_handle.0"* %ref.tmp40 to i8*
call void @llvm.lifetime.end.p0i8(i64 8, i8* %59) #4
%60 = bitcast %"struct.std::experimental::coroutines_v1::suspend_never"* %ref.tmp34 to i8*
call void @llvm.lifetime.end.p0i8(i64 1, i8* %60) #4
switch i32 %cleanup.dest.slot.2, label %cleanup50 [
i32 0, label %cleanup.cont48
]
cleanup.cont48: ; preds = %cleanup45
br label %cleanup50
cleanup50: ; preds = %cleanup.cont48, %cleanup45, %cleanup25, %cleanup
%cleanup.dest.slot.3 = phi i32 [ %cleanup.dest.slot.0, %cleanup ], [ %cleanup.dest.slot.1, %cleanup25 ], [ %cleanup.dest.slot.2, %cleanup45 ], [ 0, %cleanup.cont48 ]
%61 = bitcast %"struct.task::promise_type"* %__promise to i8*
call void @llvm.lifetime.end.p0i8(i64 1, i8* %61) #4
%62 = call i8* @llvm.coro.free(token %1, i8* %5)
%63 = icmp ne i8* %62, null
br i1 %63, label %coro.free, label %after.coro.free
coro.free: ; preds = %cleanup50
call void @_ZdlPv(i8* %62) #4
br label %after.coro.free
after.coro.free: ; preds = %cleanup50, %coro.free
switch i32 %cleanup.dest.slot.3, label %unreachable [
i32 0, label %cleanup.cont54
i32 2, label %coro.ret
]
cleanup.cont54: ; preds = %after.coro.free
br label %coro.ret
coro.ret: ; preds = %cleanup.cont54, %after.coro.free, %final.suspend, %await.suspend.bool, %init.suspend
%64 = call i1 @llvm.coro.end(i8* null, i1 false)
ret void
ehcleanup: ; preds = %lpad35, %invoke.cont33, %lpad31, %lpad2
%65 = call i1 @llvm.coro.end(i8* null, i1 true)
br i1 %65, label %eh.resume, label %cleanup.cont49
cleanup.cont49: ; preds = %ehcleanup
br label %ehcleanup51
ehcleanup51: ; preds = %cleanup.cont49, %lpad
%66 = bitcast %"struct.task::promise_type"* %__promise to i8*
call void @llvm.lifetime.end.p0i8(i64 1, i8* %66) #4
%67 = call i8* @llvm.coro.free(token %1, i8* %5)
%68 = icmp ne i8* %67, null
br i1 %68, label %coro.free56, label %after.coro.free57
coro.free56: ; preds = %ehcleanup51
call void @_ZdlPv(i8* %67) #4
br label %after.coro.free57
after.coro.free57: ; preds = %ehcleanup51, %coro.free56
br label %eh.resume
eh.resume: ; preds = %after.coro.free57, %ehcleanup
%exn58 = load i8*, i8** %exn.slot, align 8
%sel = load i32, i32* %ehselector.slot, align 4
%lpad.val = insertvalue { i8*, i32 } undef, i8* %exn58, 0
%lpad.val59 = insertvalue { i8*, i32 } %lpad.val, i32 %sel, 1
resume { i8*, i32 } %lpad.val59
terminate.lpad: ; preds = %lpad29
%69 = landingpad { i8*, i32 }
catch i8* null
%70 = extractvalue { i8*, i32 } %69, 0
call void @__clang_call_terminate(i8* %70) #12
unreachable
unreachable: ; preds = %after.coro.free
unreachable
}
; Function Attrs: argmemonly nounwind
declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #1
; Function Attrs: argmemonly nounwind readonly
declare token @llvm.coro.id(i32, i8* readnone, i8* nocapture readonly, i8*) #3
; Function Attrs: nounwind
declare i1 @llvm.coro.alloc(token) #4
; Function Attrs: nobuiltin
declare noalias i8* @_Znwm(i64) #5
; Function Attrs: nounwind readnone
declare i64 @llvm.coro.size.i64() #6
; Function Attrs: nounwind
declare i8* @llvm.coro.begin(token, i8* writeonly) #4
; Function Attrs: argmemonly nounwind
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture writeonly, i8* nocapture readonly, i64, i1) #1
; Function Attrs: nounwind ssp uwtable
define linkonce_odr void @_ZN4task12promise_type17get_return_objectEv(%"struct.task::promise_type"* %this) #7 align 2 {
entry:
%retval = alloca %struct.task, align 1
%this.addr = alloca %"struct.task::promise_type"*, align 8
store %"struct.task::promise_type"* %this, %"struct.task::promise_type"** %this.addr, align 8, !tbaa !3
%this1 = load %"struct.task::promise_type"*, %"struct.task::promise_type"** %this.addr, align 8
ret void
}
declare i32 @__gxx_personality_v0(...)
; Function Attrs: nounwind ssp uwtable
define linkonce_odr void @_ZN4task12promise_type15initial_suspendEv(%"struct.task::promise_type"* %this) #7 align 2 {
entry:
%retval = alloca %"struct.std::experimental::coroutines_v1::suspend_never", align 1
%this.addr = alloca %"struct.task::promise_type"*, align 8
store %"struct.task::promise_type"* %this, %"struct.task::promise_type"** %this.addr, align 8, !tbaa !3
%this1 = load %"struct.task::promise_type"*, %"struct.task::promise_type"** %this.addr, align 8
ret void
}
; Function Attrs: alwaysinline nounwind ssp uwtable
define linkonce_odr hidden zeroext i1 @_ZNKSt12experimental13coroutines_v113suspend_never11await_readyEv(%"struct.std::experimental::coroutines_v1::suspend_never"* %this) #8 align 2 {
entry:
%this.addr = alloca %"struct.std::experimental::coroutines_v1::suspend_never"*, align 8
store %"struct.std::experimental::coroutines_v1::suspend_never"* %this, %"struct.std::experimental::coroutines_v1::suspend_never"** %this.addr, align 8, !tbaa !3
%this1 = load %"struct.std::experimental::coroutines_v1::suspend_never"*, %"struct.std::experimental::coroutines_v1::suspend_never"** %this.addr, align 8
ret i1 true
}
; Function Attrs: nounwind
declare token @llvm.coro.save(i8*) #4
; Function Attrs: alwaysinline nounwind ssp uwtable
define linkonce_odr hidden void @_ZNKSt12experimental13coroutines_v113suspend_never13await_suspendENS0_16coroutine_handleIvEE(%"struct.std::experimental::coroutines_v1::suspend_never"* %this, i8* %.coerce) #8 align 2 {
entry:
%0 = alloca %"class.std::experimental::coroutines_v1::coroutine_handle", align 8
%this.addr = alloca %"struct.std::experimental::coroutines_v1::suspend_never"*, align 8
%coerce.dive = getelementptr inbounds %"class.std::experimental::coroutines_v1::coroutine_handle", %"class.std::experimental::coroutines_v1::coroutine_handle"* %0, i32 0, i32 0
store i8* %.coerce, i8** %coerce.dive, align 8
store %"struct.std::experimental::coroutines_v1::suspend_never"* %this, %"struct.std::experimental::coroutines_v1::suspend_never"** %this.addr, align 8, !tbaa !3
%this1 = load %"struct.std::experimental::coroutines_v1::suspend_never"*, %"struct.std::experimental::coroutines_v1::suspend_never"** %this.addr, align 8
ret void
}
; Function Attrs: alwaysinline nounwind ssp uwtable
define linkonce_odr hidden i8* @_ZNSt12experimental13coroutines_v116coroutine_handleIN4task12promise_typeEE12from_addressEPv(i8* %__addr) #8 align 2 {
entry:
%retval = alloca %"class.std::experimental::coroutines_v1::coroutine_handle.0", align 8
%__addr.addr = alloca i8*, align 8
store i8* %__addr, i8** %__addr.addr, align 8, !tbaa !3
call void @_ZNSt12experimental13coroutines_v116coroutine_handleIN4task12promise_typeEEC1Ev(%"class.std::experimental::coroutines_v1::coroutine_handle.0"* %retval) #4
%0 = load i8*, i8** %__addr.addr, align 8, !tbaa !3
%1 = bitcast %"class.std::experimental::coroutines_v1::coroutine_handle.0"* %retval to %"class.std::experimental::coroutines_v1::coroutine_handle"*
%__handle_ = getelementptr inbounds %"class.std::experimental::coroutines_v1::coroutine_handle", %"class.std::experimental::coroutines_v1::coroutine_handle"* %1, i32 0, i32 0
store i8* %0, i8** %__handle_, align 8, !tbaa !8
%coerce.dive = getelementptr inbounds %"class.std::experimental::coroutines_v1::coroutine_handle.0", %"class.std::experimental::coroutines_v1::coroutine_handle.0"* %retval, i32 0, i32 0
%coerce.dive1 = getelementptr inbounds %"class.std::experimental::coroutines_v1::coroutine_handle", %"class.std::experimental::coroutines_v1::coroutine_handle"* %coerce.dive, i32 0, i32 0
%2 = load i8*, i8** %coerce.dive1, align 8
ret i8* %2
}
; Function Attrs: nounwind
declare i8 @llvm.coro.suspend(token, i1) #4
; Function Attrs: alwaysinline nounwind ssp uwtable
define linkonce_odr hidden void @_ZNKSt12experimental13coroutines_v113suspend_never12await_resumeEv(%"struct.std::experimental::coroutines_v1::suspend_never"* %this) #8 align 2 {
entry:
%this.addr = alloca %"struct.std::experimental::coroutines_v1::suspend_never"*, align 8
store %"struct.std::experimental::coroutines_v1::suspend_never"* %this, %"struct.std::experimental::coroutines_v1::suspend_never"** %this.addr, align 8, !tbaa !3
%this1 = load %"struct.std::experimental::coroutines_v1::suspend_never"*, %"struct.std::experimental::coroutines_v1::suspend_never"** %this.addr, align 8
ret void
}
; Function Attrs: nounwind ssp uwtable
define linkonce_odr zeroext i1 @_ZN9awaitable11await_readyEv(%struct.awaitable* %this) #7 align 2 {
entry:
%this.addr = alloca %struct.awaitable*, align 8
store %struct.awaitable* %this, %struct.awaitable** %this.addr, align 8, !tbaa !3
%this1 = load %struct.awaitable*, %struct.awaitable** %this.addr, align 8
ret i1 false
}
; Function Attrs: nounwind ssp uwtable
define linkonce_odr zeroext i1 @_ZN9awaitable13await_suspendENSt12experimental13coroutines_v116coroutine_handleIvEE(%struct.awaitable* %this, i8* %awaiter.coerce) #7 align 2 {
entry:
%awaiter = alloca %"class.std::experimental::coroutines_v1::coroutine_handle", align 8
%this.addr = alloca %struct.awaitable*, align 8
%coerce.dive = getelementptr inbounds %"class.std::experimental::coroutines_v1::coroutine_handle", %"class.std::experimental::coroutines_v1::coroutine_handle"* %awaiter, i32 0, i32 0
store i8* %awaiter.coerce, i8** %coerce.dive, align 8
store %struct.awaitable* %this, %struct.awaitable** %this.addr, align 8, !tbaa !3
%this1 = load %struct.awaitable*, %struct.awaitable** %this.addr, align 8
ret i1 false
}
; Function Attrs: nounwind ssp uwtable
define linkonce_odr zeroext i1 @_ZN9awaitable12await_resumeEv(%struct.awaitable* %this) #7 align 2 {
entry:
%this.addr = alloca %struct.awaitable*, align 8
store %struct.awaitable* %this, %struct.awaitable** %this.addr, align 8, !tbaa !3
%this1 = load %struct.awaitable*, %struct.awaitable** %this.addr, align 8
ret i1 false
}
; Function Attrs: nounwind ssp uwtable
define linkonce_odr void @_ZN4task12promise_type11return_voidEv(%"struct.task::promise_type"* %this) #7 align 2 {
entry:
%this.addr = alloca %"struct.task::promise_type"*, align 8
store %"struct.task::promise_type"* %this, %"struct.task::promise_type"** %this.addr, align 8, !tbaa !3
%this1 = load %"struct.task::promise_type"*, %"struct.task::promise_type"** %this.addr, align 8
ret void
}
declare i8* @__cxa_begin_catch(i8*)
; Function Attrs: nounwind ssp uwtable
define linkonce_odr void @_ZN4task12promise_type19unhandled_exceptionEv(%"struct.task::promise_type"* %this) #7 align 2 {
entry:
%this.addr = alloca %"struct.task::promise_type"*, align 8
store %"struct.task::promise_type"* %this, %"struct.task::promise_type"** %this.addr, align 8, !tbaa !3
%this1 = load %"struct.task::promise_type"*, %"struct.task::promise_type"** %this.addr, align 8
ret void
}
declare void @__cxa_end_catch()
; Function Attrs: noinline noreturn nounwind
define linkonce_odr hidden void @__clang_call_terminate(i8*) #9 {
%2 = call i8* @__cxa_begin_catch(i8* %0) #4
call void @_ZSt9terminatev() #12
unreachable
}
declare void @_ZSt9terminatev()
; Function Attrs: nounwind ssp uwtable
define linkonce_odr void @_ZN4task12promise_type13final_suspendEv(%"struct.task::promise_type"* %this) #7 align 2 {
entry:
%retval = alloca %"struct.std::experimental::coroutines_v1::suspend_never", align 1
%this.addr = alloca %"struct.task::promise_type"*, align 8
store %"struct.task::promise_type"* %this, %"struct.task::promise_type"** %this.addr, align 8, !tbaa !3
%this1 = load %"struct.task::promise_type"*, %"struct.task::promise_type"** %this.addr, align 8
ret void
}
; Function Attrs: nounwind
declare i1 @llvm.coro.end(i8*, i1) #4
; Function Attrs: nobuiltin nounwind
declare void @_ZdlPv(i8*) #10
; Function Attrs: argmemonly nounwind readonly
declare i8* @llvm.coro.free(token, i8* nocapture readonly) #3
; Function Attrs: inlinehint nounwind ssp uwtable
define linkonce_odr void @_ZNSt12experimental13coroutines_v116coroutine_handleIN4task12promise_typeEEC1Ev(%"class.std::experimental::coroutines_v1::coroutine_handle.0"* %this) unnamed_addr #11 align 2 {
entry:
%this.addr = alloca %"class.std::experimental::coroutines_v1::coroutine_handle.0"*, align 8
store %"class.std::experimental::coroutines_v1::coroutine_handle.0"* %this, %"class.std::experimental::coroutines_v1::coroutine_handle.0"** %this.addr, align 8, !tbaa !3
%this1 = load %"class.std::experimental::coroutines_v1::coroutine_handle.0"*, %"class.std::experimental::coroutines_v1::coroutine_handle.0"** %this.addr, align 8
call void @_ZNSt12experimental13coroutines_v116coroutine_handleIN4task12promise_typeEEC2Ev(%"class.std::experimental::coroutines_v1::coroutine_handle.0"* %this1) #4
ret void
}
; Function Attrs: inlinehint nounwind ssp uwtable
define linkonce_odr void @_ZNSt12experimental13coroutines_v116coroutine_handleIN4task12promise_typeEEC2Ev(%"class.std::experimental::coroutines_v1::coroutine_handle.0"* %this) unnamed_addr #11 align 2 {
entry:
%this.addr = alloca %"class.std::experimental::coroutines_v1::coroutine_handle.0"*, align 8
store %"class.std::experimental::coroutines_v1::coroutine_handle.0"* %this, %"class.std::experimental::coroutines_v1::coroutine_handle.0"** %this.addr, align 8, !tbaa !3
%this1 = load %"class.std::experimental::coroutines_v1::coroutine_handle.0"*, %"class.std::experimental::coroutines_v1::coroutine_handle.0"** %this.addr, align 8
%0 = bitcast %"class.std::experimental::coroutines_v1::coroutine_handle.0"* %this1 to %"class.std::experimental::coroutines_v1::coroutine_handle"*
call void @_ZNSt12experimental13coroutines_v116coroutine_handleIvEC2Ev(%"class.std::experimental::coroutines_v1::coroutine_handle"* %0) #4
ret void
}
; Function Attrs: alwaysinline nounwind ssp uwtable
define linkonce_odr hidden void @_ZNSt12experimental13coroutines_v116coroutine_handleIvEC2Ev(%"class.std::experimental::coroutines_v1::coroutine_handle"* %this) unnamed_addr #8 align 2 {
entry:
%this.addr = alloca %"class.std::experimental::coroutines_v1::coroutine_handle"*, align 8
store %"class.std::experimental::coroutines_v1::coroutine_handle"* %this, %"class.std::experimental::coroutines_v1::coroutine_handle"** %this.addr, align 8, !tbaa !3
%this1 = load %"class.std::experimental::coroutines_v1::coroutine_handle"*, %"class.std::experimental::coroutines_v1::coroutine_handle"** %this.addr, align 8
%__handle_ = getelementptr inbounds %"class.std::experimental::coroutines_v1::coroutine_handle", %"class.std::experimental::coroutines_v1::coroutine_handle"* %this1, i32 0, i32 0
store i8* null, i8** %__handle_, align 8, !tbaa !8
ret void
}
attributes #0 = { norecurse ssp uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="penryn" "target-features"="+cx16,+fxsr,+mmx,+sahf,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #1 = { argmemonly nounwind }
attributes #2 = { ssp uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="penryn" "target-features"="+cx16,+fxsr,+mmx,+sahf,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #3 = { argmemonly nounwind readonly }
attributes #4 = { nounwind }
attributes #5 = { nobuiltin "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="penryn" "target-features"="+cx16,+fxsr,+mmx,+sahf,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #6 = { nounwind readnone }
attributes #7 = { nounwind ssp uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="penryn" "target-features"="+cx16,+fxsr,+mmx,+sahf,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #8 = { alwaysinline nounwind ssp uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="penryn" "target-features"="+cx16,+fxsr,+mmx,+sahf,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #9 = { noinline noreturn nounwind }
attributes #10 = { nobuiltin nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="penryn" "target-features"="+cx16,+fxsr,+mmx,+sahf,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #11 = { inlinehint nounwind ssp uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="penryn" "target-features"="+cx16,+fxsr,+mmx,+sahf,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #12 = { noreturn nounwind }
!llvm.module.flags = !{!0, !1}
!llvm.ident = !{!2}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 7, !"PIC Level", i32 2}
!2 = !{!"clang version 7.0.0 (http://llvm.org/git/clang.git 75ec747077d46ed5c15d28b06981d5291159d7b2) (https://git.llvm.org/git/llvm.git/ 5fbee8fcb1fbb0940548229a160a8e13179c4cb2)"}
!3 = !{!4, !4, i64 0}
!4 = !{!"any pointer", !5, i64 0}
!5 = !{!"omnipotent char", !6, i64 0}
!6 = !{!"Simple C++ TBAA"}
!7 = !{i64 0, i64 8, !3}
!8 = !{!9, !4, i64 0}
!9 = !{!"_ZTSNSt12experimental13coroutines_v116coroutine_handleIvEE", !4, i64 0}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment