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