brintos

brintos / llvm-project-archived public Read only

0
0
Text · 818 B · acae63f Raw
19 lines · c
1// RUN: %clang_cc1 -fblocks -triple i386-pc-windows-msvc %s -emit-llvm -o - -fblocks | FileCheck %s2 3 4int (^x)(void) = ^() { return 21; };5 6 7// Check that the block literal is emitted with a null isa pointer8// CHECK: @__block_literal_global = internal global { ptr, i32, i32, ptr, ptr } { ptr null, 9 10// Check that _NSConcreteGlobalBlock has the correct dllimport specifier.11// CHECK: @_NSConcreteGlobalBlock = external dllimport global ptr12// Check that we create an initialiser pointer in the correct section (early library initialisation).13// CHECK: @.block_isa_init_ptr = internal constant ptr @.block_isa_init, section ".CRT$XCLa"14 15// Check that we emit an initialiser for it.16// CHECK: define internal void @.block_isa_init() {17// CHECK: store ptr @_NSConcreteGlobalBlock, ptr @__block_literal_global, align 418 19