blob: fd6e31d7d5b6ba7ce8471fe4aa33834f8229bee4 [file] [log] [blame]
Hans Wennborgc9bd88e2014-01-14 19:35:09 +00001// RUN: %clang_cc1 -emit-llvm -fms-extensions -triple=x86_64-pc-win32 -g %s -o - -std=c++11 | FileCheck %s
Fariborz Jahanian945a08d2014-09-24 16:28:40 +00002// RUN: %clang_cc1 -emit-llvm -fms-extensions -triple=x86_64-unknown-unknown -g %s -o - -std=c++11 2>&1 | FileCheck %s --check-prefix=CHECK-ITANIUM
Manman Ren404fbfe2013-08-28 18:31:02 +00003
Duncan P. N. Exon Smith9dd4e4e2015-04-29 16:40:08 +00004// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "tmpl_guid<&__uuidof(uuid)>"
Duncan P. N. Exon Smithf04be1f2015-03-03 17:25:55 +00005// CHECK-SAME: templateParams: [[TGIARGS:![0-9]*]]
Duncan P. N. Exon Smithb3a66692014-12-15 19:10:08 +00006// CHECK: [[TGIARGS]] = !{[[TGIARG1:![0-9]*]]}
Duncan P. N. Exon Smith9dd4e4e2015-04-29 16:40:08 +00007// CHECK: [[TGIARG1]] = !DITemplateValueParameter(
Duncan P. N. Exon Smithf04be1f2015-03-03 17:25:55 +00008// CHECK-SAME: type: [[CONST_GUID_PTR:![0-9]*]]
9// CHECK-SAME: value: { i32, i16, i16, [8 x i8] }* @_GUID_12345678_1234_1234_1234_1234567890ab
Duncan P. N. Exon Smith9dd4e4e2015-04-29 16:40:08 +000010// CHECK: [[CONST_GUID_PTR]] = !DIDerivedType(tag: DW_TAG_pointer_type
Duncan P. N. Exon Smithf04be1f2015-03-03 17:25:55 +000011// CHECK-SAME: baseType: [[CONST_GUID:![0-9]*]]
12// CHECK-SAME: size: 64
13// CHECK-SAME: align: 64
Duncan P. N. Exon Smith9dd4e4e2015-04-29 16:40:08 +000014// CHECK: [[CONST_GUID]] = !DIDerivedType(tag: DW_TAG_const_type
Duncan P. N. Exon Smithf04be1f2015-03-03 17:25:55 +000015// CHECK-SAME: baseType: [[GUID:![0-9]*]]
Duncan P. N. Exon Smith9dd4e4e2015-04-29 16:40:08 +000016// CHECK: [[GUID]] = !DICompositeType(tag: DW_TAG_structure_type, name: "_GUID"
Manman Ren404fbfe2013-08-28 18:31:02 +000017
Duncan P. N. Exon Smith9dd4e4e2015-04-29 16:40:08 +000018// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "tmpl_guid2<__uuidof(uuid)>"
Duncan P. N. Exon Smithf04be1f2015-03-03 17:25:55 +000019// CHECK-SAME: templateParams: [[TGI2ARGS:![0-9]*]]
Duncan P. N. Exon Smithb3a66692014-12-15 19:10:08 +000020// CHECK: [[TGI2ARGS]] = !{[[TGI2ARG1:![0-9]*]]}
Duncan P. N. Exon Smith9dd4e4e2015-04-29 16:40:08 +000021// CHECK: [[TGI2ARG1]] = !DITemplateValueParameter(
Duncan P. N. Exon Smithf04be1f2015-03-03 17:25:55 +000022// CHECK-SAME: type: [[CONST_GUID_REF:![0-9]*]]
23// CHECK-SAME: value: { i32, i16, i16, [8 x i8] }* @_GUID_12345678_1234_1234_1234_1234567890ab
Duncan P. N. Exon Smith9dd4e4e2015-04-29 16:40:08 +000024// CHECK: [[CONST_GUID_REF]] = !DIDerivedType(tag: DW_TAG_reference_type,
Duncan P. N. Exon Smithf04be1f2015-03-03 17:25:55 +000025// CHECK-SAME: baseType: [[CONST_GUID:![0-9]*]]
David Majnemer922ad9f2014-10-24 19:49:04 +000026
Duncan P. N. Exon Smith9dd4e4e2015-04-29 16:40:08 +000027// CHECK-ITANIUM: !DICompositeType(tag: DW_TAG_structure_type, name: "tmpl_guid<&__uuidof(uuid)>"
Duncan P. N. Exon Smithf04be1f2015-03-03 17:25:55 +000028// CHECK-ITANIUM-SAME: identifier: "_ZTS9tmpl_guidIXadu8__uuidoft4uuidEE"
Duncan P. N. Exon Smith9dd4e4e2015-04-29 16:40:08 +000029// CHECK-ITANIUM: !DICompositeType(tag: DW_TAG_structure_type, name: "tmpl_guid2<__uuidof(uuid)>"
Duncan P. N. Exon Smithf04be1f2015-03-03 17:25:55 +000030// CHECK-ITANIUM-SAME: identifier: "_ZTS10tmpl_guid2IXu8__uuidoft4uuidEE"
Manman Rene0064d82013-08-29 23:19:58 +000031
Manman Ren404fbfe2013-08-28 18:31:02 +000032struct _GUID;
33template <const _GUID *>
34struct tmpl_guid {
35};
36
37struct __declspec(uuid("{12345678-1234-1234-1234-1234567890ab}")) uuid;
38tmpl_guid<&__uuidof(uuid)> tgi;
David Majnemer922ad9f2014-10-24 19:49:04 +000039
40template <const _GUID &>
41struct tmpl_guid2 {};
42tmpl_guid2<__uuidof(uuid)> tgi2;