1 // RUN: %clang_cc1 -no-opaque-pointers -x c++ -std=c++11 -fblocks -emit-llvm %s -o - | FileCheck %s 2 3 // CHECK: %struct.__block_byref_baz = type { i8*, %struct.__block_byref_baz*, i32, i32, i32 } 4 // CHECK: [[baz:%[0-9a-z_]*]] = alloca %struct.__block_byref_baz 5 // CHECK: [[bazref:%[0-9a-z_\.]*]] = getelementptr inbounds %struct.__block_byref_baz, %struct.__block_byref_baz* [[baz]], i32 0, i32 1 6 // CHECK: store %struct.__block_byref_baz* [[baz]], %struct.__block_byref_baz** [[bazref]] 7 // CHECK: bitcast %struct.__block_byref_baz* [[baz]] to i8* 8 // CHECK: [[disposable:%[0-9a-z_]*]] = bitcast %struct.__block_byref_baz* [[baz]] to i8* 9 // CHECK: call void @_Block_object_dispose(i8* [[disposable]] 10 11 int main() { 12 __block int baz = [&]() { return 0; }(); 13 ^{ (void)baz; }; 14 return 0; 15 } 16