1 // RUN: %clang_cc1 -emit-llvm -fms-extensions -triple=x86_64-pc-win32 -g %s -o - -std=c++11 | FileCheck %s
2 // 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
3 
4 // CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "tmpl_guid<&__uuidof(uuid)>"
5 // CHECK-SAME:             templateParams: [[TGIARGS:![0-9]*]]
6 // CHECK: [[TGIARGS]] = !{[[TGIARG1:![0-9]*]]}
7 // CHECK: [[TGIARG1]] = !MDTemplateValueParameter(
8 // CHECK-SAME:                                    type: [[CONST_GUID_PTR:![0-9]*]]
9 // CHECK-SAME:                                    value: { i32, i16, i16, [8 x i8] }* @_GUID_12345678_1234_1234_1234_1234567890ab
10 // CHECK: [[CONST_GUID_PTR]] = !MDDerivedType(tag: DW_TAG_pointer_type
11 // CHECK-SAME:                                baseType: [[CONST_GUID:![0-9]*]]
12 // CHECK-SAME:                                size: 64
13 // CHECK-SAME:                                align: 64
14 // CHECK: [[CONST_GUID]] = !MDDerivedType(tag: DW_TAG_const_type
15 // CHECK-SAME:                            baseType: [[GUID:![0-9]*]]
16 // CHECK: [[GUID]] = !MDCompositeType(tag: DW_TAG_structure_type, name: "_GUID"
17 
18 // CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "tmpl_guid2<__uuidof(uuid)>"
19 // CHECK-SAME:             templateParams: [[TGI2ARGS:![0-9]*]]
20 // CHECK: [[TGI2ARGS]] = !{[[TGI2ARG1:![0-9]*]]}
21 // CHECK: [[TGI2ARG1]] = !MDTemplateValueParameter(
22 // CHECK-SAME:                                     type: [[CONST_GUID_REF:![0-9]*]]
23 // CHECK-SAME:                                     value: { i32, i16, i16, [8 x i8] }* @_GUID_12345678_1234_1234_1234_1234567890ab
24 // CHECK: [[CONST_GUID_REF]] = !MDDerivedType(tag: DW_TAG_reference_type,
25 // CHECK-SAME:                                baseType: [[CONST_GUID:![0-9]*]]
26 
27 // CHECK-ITANIUM: !MDCompositeType(tag: DW_TAG_structure_type, name: "tmpl_guid<&__uuidof(uuid)>"
28 // CHECK-ITANIUM-SAME:             identifier: "_ZTS9tmpl_guidIXadu8__uuidoft4uuidEE"
29 // CHECK-ITANIUM: !MDCompositeType(tag: DW_TAG_structure_type, name: "tmpl_guid2<__uuidof(uuid)>"
30 // CHECK-ITANIUM-SAME:             identifier: "_ZTS10tmpl_guid2IXu8__uuidoft4uuidEE"
31 
32 struct _GUID;
33 template <const _GUID *>
34 struct tmpl_guid {
35 };
36 
37 struct __declspec(uuid("{12345678-1234-1234-1234-1234567890ab}")) uuid;
38 tmpl_guid<&__uuidof(uuid)> tgi;
39 
40 template <const _GUID &>
41 struct tmpl_guid2 {};
42 tmpl_guid2<__uuidof(uuid)> tgi2;
43