1 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fblocks -fobjc-arc -emit-llvm -o - %s | FileCheck %s
3 // CHECK: %[[STRUCT_A:.*]] = type { ptr }
11 // Check that the compound literal is destructed at the end of the enclosing scope.
13 // CHECK-LABEL: define void @foo0()
14 // CHECK: %[[_COMPOUNDLITERAL:.*]] = alloca %[[STRUCT_A]], align 8
15 // CHECK: getelementptr inbounds nuw %[[STRUCT_A]], ptr %[[_COMPOUNDLITERAL]], i32 0, i32 0
16 // CHECK: %[[F1:.*]] = getelementptr inbounds nuw %[[STRUCT_A]], ptr %[[_COMPOUNDLITERAL]], i32 0, i32 0
17 // CHECK: %[[V2:.*]] = load ptr, ptr %[[F1]], align 8
18 // CHECK: call void asm sideeffect "", "r,~{dirflag},~{fpsr},~{flags}"(ptr %[[V2]])
19 // CHECK: call void asm sideeffect "",
20 // CHECK: call void @__destructor_8_s0(ptr %[[_COMPOUNDLITERAL]])
23 asm("" : : "r"(((A){a}).f) );