1 // RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-windows-msvc -debug-info-kind=limited -gcodeview -fdeclspec -S -emit-llvm %s -o - | FileCheck %s
6 __declspec(allocator
) void *alloc_void(void);
7 __declspec(allocator
) struct Foo
*alloc_foo(void);
9 void call_alloc(void) {
10 struct Foo
*p
= alloc_void();
11 struct Foo
*w
= alloc_foo();
12 struct Foo
*q
= (struct Foo
*)alloc_void();
13 struct Foo
*r
= (struct Foo
*)(struct Bar
*)alloc_void();
16 // CHECK-LABEL: define {{.*}}void @call_alloc
17 // CHECK: call i8* {{.*}}@alloc_void{{.*}} !heapallocsite [[DBG1:!.*]]
18 // CHECK: call %struct.Foo* {{.*}}@alloc_foo{{.*}} !heapallocsite [[DBG2:!.*]]
19 // CHECK: call i8* {{.*}}@alloc_void{{.*}} !heapallocsite [[DBG2]]
20 // CHECK: call i8* {{.*}}@alloc_void{{.*}} !heapallocsite [[DBG3:!.*]]
22 // CHECK: [[DBG2]] = !DICompositeType(tag: DW_TAG_structure_type,
23 // CHECK-SAME: name: "Foo"
24 // CHECK: [[DBG3]] = !DICompositeType(tag: DW_TAG_structure_type,
25 // CHECK-SAME: name: "Bar"
26 // CHECK: [[DBG1]] = !{}