Stephen Hines | 176edba | 2014-12-01 14:53:08 -0800 | [diff] [blame] | 1 | // RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm-only -std=c++14 -emit-llvm -g %s -o - | FileCheck %s |
| 2 | |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 3 | // CHECK: [[EMPTY:![0-9]*]] = !{} |
Pirama Arumuga Nainar | 3ea9e33 | 2015-04-08 08:57:32 -0700 | [diff] [blame] | 4 | // CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "foo", |
| 5 | // CHECK-SAME: elements: [[EMPTY]] |
Stephen Hines | 176edba | 2014-12-01 14:53:08 -0800 | [diff] [blame] | 6 | // FIXME: The context of this definition should be the CU/file scope, not the class. |
Pirama Arumuga Nainar | 3ea9e33 | 2015-04-08 08:57:32 -0700 | [diff] [blame] | 7 | // CHECK: !MDSubprogram(name: "func", {{.*}} scope: !"_ZTS3foo" |
| 8 | // CHECK-SAME: type: [[SUBROUTINE_TYPE:![0-9]*]] |
| 9 | // CHECK-SAME: isDefinition: true |
| 10 | // CHECK-SAME: declaration: [[FUNC_DECL:![0-9]*]] |
| 11 | // CHECK: [[SUBROUTINE_TYPE]] = !MDSubroutineType(types: [[TYPE_LIST:![0-9]*]]) |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 12 | // CHECK: [[TYPE_LIST]] = !{[[INT:![0-9]*]]} |
Pirama Arumuga Nainar | 3ea9e33 | 2015-04-08 08:57:32 -0700 | [diff] [blame] | 13 | // CHECK: [[INT]] = !MDBasicType(name: "int" |
| 14 | // CHECK: [[FUNC_DECL]] = !MDSubprogram(name: "func", |
| 15 | // CHECK-SAME: scope: !"_ZTS3foo" |
| 16 | // CHECK-SAME: type: [[SUBROUTINE_TYPE]] |
| 17 | // CHECK-SAME: isDefinition: false |
David Blaikie | 9129648 | 2013-05-24 21:24:35 +0000 | [diff] [blame] | 18 | |
| 19 | struct foo { |
Stephen Hines | 176edba | 2014-12-01 14:53:08 -0800 | [diff] [blame] | 20 | static auto func(); |
David Blaikie | 9129648 | 2013-05-24 21:24:35 +0000 | [diff] [blame] | 21 | }; |
| 22 | |
| 23 | foo f; |
Stephen Hines | 176edba | 2014-12-01 14:53:08 -0800 | [diff] [blame] | 24 | |
| 25 | auto foo::func() { |
| 26 | return 1; |
| 27 | } |