forked from OSchip/llvm-project
AST: Elaborated type specifier mangling occurs before nested-name
The Ts/Tu/Te manglings should occur before the nested-name's N. llvm-svn: 206247
This commit is contained in:
parent
88368bae4c
commit
2e159fb6db
|
@ -2359,8 +2359,6 @@ void CXXNameMangler::mangleType(const TemplateSpecializationType *T) {
|
|||
}
|
||||
|
||||
void CXXNameMangler::mangleType(const DependentNameType *T) {
|
||||
// Typename types are always nested
|
||||
Out << 'N';
|
||||
// Proposal by cxx-abi-dev, 2014-03-26
|
||||
// <class-enum-type> ::= <name> # non-dependent or dependent type name or
|
||||
// # dependent elaborated type specifier using
|
||||
|
@ -2388,6 +2386,8 @@ void CXXNameMangler::mangleType(const DependentNameType *T) {
|
|||
default:
|
||||
llvm_unreachable("unexpected keyword for dependent type name");
|
||||
}
|
||||
// Typename types are always nested
|
||||
Out << 'N';
|
||||
manglePrefix(T->getQualifier());
|
||||
mangleSourceName(T->getIdentifier());
|
||||
Out << 'E';
|
||||
|
|
|
@ -959,7 +959,7 @@ namespace test45 {
|
|||
template <typename T>
|
||||
void f(enum T::e *) {}
|
||||
template void f<S>(S::e *);
|
||||
// CHECK-LABEL: define weak_odr void @_ZN6test451fINS_1SEEEvPNTeT_1eE(i32*)
|
||||
// CHECK-LABEL: define weak_odr void @_ZN6test451fINS_1SEEEvPTeNT_1eE(i32*)
|
||||
}
|
||||
|
||||
namespace test46 {
|
||||
|
@ -969,7 +969,7 @@ namespace test46 {
|
|||
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"*)
|
||||
// CHECK-LABEL: define weak_odr void @_ZN6test461fINS_1SEEEvPTsNT_1sE(%"struct.test46::S::s"*)
|
||||
}
|
||||
|
||||
namespace test47 {
|
||||
|
@ -979,7 +979,7 @@ namespace test47 {
|
|||
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"*)
|
||||
// CHECK-LABEL: define weak_odr void @_ZN6test471fINS_1SEEEvPTsNT_1cE(%"class.test47::S::c"*)
|
||||
}
|
||||
|
||||
namespace test48 {
|
||||
|
@ -989,5 +989,5 @@ namespace test48 {
|
|||
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"*)
|
||||
// CHECK-LABEL: define weak_odr void @_ZN6test481fINS_1SEEEvPTuNT_1uE(%"union.test48::S::u"*)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue