[ELF] Reorder SectionBase/InputSectionBase members
[llvm-project.git] / clang / test / CodeGen / debug-info-codeview-heapallocsite.c
blob95d4cc9749c1db16025b68efabbba5abb3806faf
1 // RUN: %clang_cc1 -triple x86_64-windows-msvc -debug-info-kind=limited -gcodeview -fdeclspec -emit-llvm %s -o - | FileCheck %s
3 struct Foo;
4 struct Bar;
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 ptr {{.*}}@alloc_void{{.*}} !heapallocsite [[DBG1:!.*]]
18 // CHECK: call ptr {{.*}}@alloc_foo{{.*}} !heapallocsite [[DBG2:!.*]]
19 // CHECK: call ptr {{.*}}@alloc_void{{.*}} !heapallocsite [[DBG2]]
20 // CHECK: call ptr {{.*}}@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]] = !{}