brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 012eb38 Raw
46 lines · cpp
1// RUN: %clang_cc1 -triple %itanium_abi_triple-only -std=c++14 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s2 3// CHECK: imports: [[IMPS:![0-9]*]]4 5// CHECK: [[IMPS]] = !{[[IMP:![0-9]*]]}6// CHECK: [[IMP]] = !DIImportedEntity(7// CHECK-SAME: entity: [[F3:![0-9]*]]8// CHECK: [[F3]] = distinct !DISubprogram(name: "f3"9// CHECK-SAME:          type: [[SUBROUTINE_TYPE:![0-9]*]]10// CHECK: [[SUBROUTINE_TYPE]] = !DISubroutineType(types: [[TYPE_LIST:![0-9]*]])11// CHECK: [[TYPE_LIST]] = !{[[INT:![0-9]*]]}12// CHECK: [[INT]] = !DIBasicType(name: "int"13 14// CHECK: [[FOO:![0-9]+]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "foo",15// CHECK-SAME:             elements: [[EMPTY:![0-9]*]]16// CHECK: [[EMPTY]] = !{}17 18// FIXME: The context of this definition should be the CU/file scope, not the class.19// CHECK: !DISubprogram(name: "func", {{.*}} scope: [[FOO]]20// CHECK-SAME:          type: [[SUBROUTINE_TYPE]]21// CHECK-SAME:          DISPFlagDefinition22// CHECK-SAME:          declaration: [[FUNC_DECL:![0-9]*]]23// CHECK: [[FUNC_DECL]] = !DISubprogram(name: "func",24// CHECK-SAME:                          scope: [[FOO]]25// CHECK-SAME:                          type: [[SUBROUTINE_TYPE]]26// CHECK-SAME:                          spFlags: 027 28struct foo {29  static auto func();30};31 32foo f;33 34auto foo::func() {35  return 1;36}37 38namespace ns {39auto f2();40auto f3() {41  return 0;42}43}44using ns::f2;45using ns::f3;46