Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / CodeGen / mangle-blocks.c
blobc87ee3a8ea9d03dfb9458b6e3ceb38ada06e3799
1 // RUN: %clang_cc1 -triple i386-apple-ios -fblocks -emit-llvm -o - %s | FileCheck %s
3 void __assert_rtn(const char *, const char *, int, const char *)
4 __attribute__ (( noreturn ));
6 void (^mangle(void))(void) {
7 return ^{
8 void (^block)(void) = ^{
9 __assert_rtn(__func__, __FILE__, __LINE__, "mangle");
14 // CHECK: @__func__.__mangle_block_invoke_2 = private unnamed_addr constant [22 x i8] c"mangle_block_invoke_2\00", align 1
15 // CHECK: @.str{{.*}} = private unnamed_addr constant {{.*}}, align 1
16 // CHECK: @.str[[STR1:.*]] = private unnamed_addr constant [7 x i8] c"mangle\00", align 1
18 // CHECK: define internal void @__mangle_block_invoke(ptr noundef %.block_descriptor)
20 // CHECK: define internal void @__mangle_block_invoke_2(ptr noundef %.block_descriptor){{.*}}{
21 // CHECK: call void @__assert_rtn(ptr noundef @__func__.__mangle_block_invoke_2, ptr noundef @{{.*}}, i32 noundef 9, ptr noundef @.str[[STR1]])
22 // CHECK: }