Skip to content

Commit 9a6cef7

Browse files
committedJun 28, 2019
[demangle] Support for C++2a char8_t
llvm-svn: 364677
1 parent 1c6337c commit 9a6cef7

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed
 

‎libcxxabi/src/demangle/ItaniumDemangle.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3624,6 +3624,10 @@ Node *AbstractManglingParser<Derived, Alloc>::parseType() {
36243624
case 's':
36253625
First += 2;
36263626
return make<NameType>("char16_t");
3627+
// ::= Du # char8_t (C++2a, not yet in the Itanium spec)
3628+
case 'u':
3629+
First += 2;
3630+
return make<NameType>("char8_t");
36273631
// ::= Da # auto (in dependent new-expressions)
36283632
case 'a':
36293633
First += 2;

‎libcxxabi/test/test_demangle.pass.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29772,6 +29772,9 @@ const char* cases[][2] =
2977229772

2977329773
{"_ZN3FooIXu8__uuidofzdeL_Z3sucEEEC1Ev", "Foo<__uuidof(*(suc))>::Foo()"},
2977429774
{"_ZN3FooIXu8__uuidoft13SomeUUIDClassEEC1Ev", "Foo<__uuidof(SomeUUIDClass)>::Foo()"},
29775+
29776+
// C++2a char8_t:
29777+
{"_ZTSPDu", "typeinfo name for char8_t*"},
2977529778
};
2977629779

2977729780
const unsigned N = sizeof(cases) / sizeof(cases[0]);

‎llvm/include/llvm/Demangle/ItaniumDemangle.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3624,6 +3624,10 @@ Node *AbstractManglingParser<Derived, Alloc>::parseType() {
36243624
case 's':
36253625
First += 2;
36263626
return make<NameType>("char16_t");
3627+
// ::= Du # char8_t (C++2a, not yet in the Itanium spec)
3628+
case 'u':
3629+
First += 2;
3630+
return make<NameType>("char8_t");
36273631
// ::= Da # auto (in dependent new-expressions)
36283632
case 'a':
36293633
First += 2;

0 commit comments

Comments
 (0)