xref: /minix3/external/bsd/llvm/dist/clang/test/SemaObjC/debugger-support.m (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1f4a2713aSLionel Sambuc// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fdebugger-support %s -emit-llvm -o - | FileCheck %s
2f4a2713aSLionel Sambuc
3f4a2713aSLionel Sambuc// rdar://problem/9416370
4f4a2713aSLionel Sambucvoid test0(id x) {
5f4a2713aSLionel Sambuc  struct A { int w, x, y, z; };
6f4a2713aSLionel Sambuc  struct A result = (struct A) [x makeStruct];
7f4a2713aSLionel Sambuc  // CHECK:     define void @test0(
8f4a2713aSLionel Sambuc  // CHECK:      [[X:%.*]] = alloca i8*, align 8
9f4a2713aSLionel Sambuc  // CHECK-NEXT: [[RESULT:%.*]] = alloca [[A:%.*]], align 4
10f4a2713aSLionel Sambuc  // CHECK-NEXT: store i8* {{%.*}}, i8** [[X]],
11f4a2713aSLionel Sambuc  // CHECK-NEXT: [[T0:%.*]] = load i8** [[X]],
12*0a6a1f1dSLionel Sambuc  // CHECK-NEXT: [[T1:%.*]] = load i8** @OBJC_SELECTOR_REFERENCES_
13f4a2713aSLionel Sambuc  // CHECK-NEXT: [[T2:%.*]] = call { i64, i64 } bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to { i64, i64 } (i8*, i8*)*)(i8* [[T0]], i8* [[T1]])
14f4a2713aSLionel Sambuc}
15