summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/mangle.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2014-04-10 00:49:24 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2014-04-10 00:49:24 +0000
commit9fad0fcce426632c7788178f43018aae4a87d4b1 (patch)
tree55599ec95f11e8759b14eadf258d4e3fcf093962 /test/CodeGenCXX/mangle.cpp
parentae39224b94f530afbe07317efa4e4eade7634559 (diff)
AST: Implement proposal for dependent elaborated type specifiers
cxx-abi-dev came up with a way to disambiguate between different keywords used in elaborated type specifiers. This resolves certain collisions during mangling. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205943 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/mangle.cpp')
-rw-r--r--test/CodeGenCXX/mangle.cpp40
1 files changed, 40 insertions, 0 deletions
diff --git a/test/CodeGenCXX/mangle.cpp b/test/CodeGenCXX/mangle.cpp
index ffb66361fc..24207dbce6 100644
--- a/test/CodeGenCXX/mangle.cpp
+++ b/test/CodeGenCXX/mangle.cpp
@@ -951,3 +951,43 @@ namespace test44 {
}
// CHECK-LABEL: define linkonce_odr void @_ZN6test443foo3barEv(%"struct.test44::foo"* %this)
}
+
+namespace test45 {
+ struct S {
+ enum e {};
+ };
+ template <typename T>
+ void f(enum T::e *) {}
+ template void f<S>(S::e *);
+ // CHECK-LABEL: define weak_odr void @_ZN6test451fINS_1SEEEvPNTeT_1eE(i32*)
+}
+
+namespace test46 {
+ struct S {
+ struct s {};
+ };
+ template <typename T>
+ void f(struct T::s *) {}
+ template void f<S>(S::s *);
+ // CHECK-LABEL: define weak_odr void @_ZN6test461fINS_1SEEEvPNTsT_1sE(%"struct.test46::S::s"*)
+}
+
+namespace test47 {
+ struct S {
+ class c {};
+ };
+ template <typename T>
+ void f(class T::c *) {}
+ template void f<S>(S::c *);
+ // CHECK-LABEL: define weak_odr void @_ZN6test471fINS_1SEEEvPNTsT_1cE(%"class.test47::S::c"*)
+}
+
+namespace test48 {
+ struct S {
+ union u {};
+ };
+ template <typename T>
+ void f(union T::u *) {}
+ template void f<S>(S::u *);
+ // CHECK-LABEL: define weak_odr void @_ZN6test481fINS_1SEEEvPNTuT_1uE(%"union.test48::S::u"*)
+}