summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/mangle-ms-templates.cpp
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2014-06-10 20:06:25 +0000
committerReid Kleckner <reid@kleckner.net>2014-06-10 20:06:25 +0000
commit1c94b59a5729013a7ff1494c497243b6f3fd0bd2 (patch)
tree81a45b8f9b948b3beaae5154014e467a7a21fcb5 /test/CodeGenCXX/mangle-ms-templates.cpp
parent46b0fc6db2d09f5bf735bea4a399a9574c5a7fa1 (diff)
Fix mangling of __uuidof after two levels of template instantiation
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210570 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/mangle-ms-templates.cpp')
-rw-r--r--test/CodeGenCXX/mangle-ms-templates.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CodeGenCXX/mangle-ms-templates.cpp b/test/CodeGenCXX/mangle-ms-templates.cpp
index 24e4f4abb8..31fda2046c 100644
--- a/test/CodeGenCXX/mangle-ms-templates.cpp
+++ b/test/CodeGenCXX/mangle-ms-templates.cpp
@@ -262,3 +262,17 @@ void CallFunctionDefinedWithInjectedName() {
FunctionDefinedWithInjectedName(TypeWithFriendDefinition<int>());
}
// CHECK: @"\01?FunctionDefinedWithInjectedName@@YAXU?$TypeWithFriendDefinition@H@@@Z"
+
+// We need to be able to feed GUIDs through a couple rounds of template
+// substitution.
+template <const _GUID *G>
+struct UUIDType3 {
+ void foo() {}
+};
+template <const _GUID *G>
+struct UUIDType4 : UUIDType3<G> {
+ void bar() { UUIDType4::foo(); }
+};
+template struct UUIDType4<&__uuidof(uuid)>;
+// CHECK: "\01?bar@?$UUIDType4@$1?_GUID_12345678_1234_1234_1234_1234567890ab@@3U__s_GUID@@B@@QAEXXZ"
+// CHECK: "\01?foo@?$UUIDType3@$1?_GUID_12345678_1234_1234_1234_1234567890ab@@3U__s_GUID@@B@@QAEXXZ"