[libc++abi] Fix C++ demangling for _BitInt type (#143466)
The front-end expects _BitInt to be available for substitution; ensure DB<n> is added to Subs in ItaniumDemangle.h. Also add a test case to libc++abi and sync the files to llvm/include/llvm.
This commit is contained in:
@@ -4468,7 +4468,9 @@ Node *AbstractManglingParser<Derived, Alloc>::parseType() {
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
if (!consumeIf('_'))
|
if (!consumeIf('_'))
|
||||||
return nullptr;
|
return nullptr;
|
||||||
return make<BitIntType>(Size, Signed);
|
// The front end expects this to be available for Substitution
|
||||||
|
Result = make<BitIntType>(Size, Signed);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
// ::= Di # char32_t
|
// ::= Di # char32_t
|
||||||
case 'i':
|
case 'i':
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
{"_Z1fDU10_", "f(unsigned _BitInt(10))"},
|
{"_Z1fDU10_", "f(unsigned _BitInt(10))"},
|
||||||
{"_Z1fIfEvDUstPT__", "void f<float>(unsigned _BitInt(sizeof (float*)))"},
|
{"_Z1fIfEvDUstPT__", "void f<float>(unsigned _BitInt(sizeof (float*)))"},
|
||||||
{"_Z1fIiEvDBstPT__", "void f<int>(_BitInt(sizeof (int*)))"},
|
{"_Z1fIiEvDBstPT__", "void f<int>(_BitInt(sizeof (int*)))"},
|
||||||
|
{"_Z6myfuncRDB8_S0_", "myfunc(_BitInt(8)&, _BitInt(8)&)"},
|
||||||
{"_Z4testI1A1BE1Cv", "C test<A, B>()"},
|
{"_Z4testI1A1BE1Cv", "C test<A, B>()"},
|
||||||
{"_Z4testI1A1BET0_T_S3_", "B test<A, B>(A, A)"},
|
{"_Z4testI1A1BET0_T_S3_", "B test<A, B>(A, A)"},
|
||||||
{"_ZN1SgtEi", "S::operator>(int)"},
|
{"_ZN1SgtEi", "S::operator>(int)"},
|
||||||
|
|||||||
@@ -4468,7 +4468,9 @@ Node *AbstractManglingParser<Derived, Alloc>::parseType() {
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
if (!consumeIf('_'))
|
if (!consumeIf('_'))
|
||||||
return nullptr;
|
return nullptr;
|
||||||
return make<BitIntType>(Size, Signed);
|
// The front end expects this to be available for Substitution
|
||||||
|
Result = make<BitIntType>(Size, Signed);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
// ::= Di # char32_t
|
// ::= Di # char32_t
|
||||||
case 'i':
|
case 'i':
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
{"_Z1fDU10_", "f(unsigned _BitInt(10))"},
|
{"_Z1fDU10_", "f(unsigned _BitInt(10))"},
|
||||||
{"_Z1fIfEvDUstPT__", "void f<float>(unsigned _BitInt(sizeof (float*)))"},
|
{"_Z1fIfEvDUstPT__", "void f<float>(unsigned _BitInt(sizeof (float*)))"},
|
||||||
{"_Z1fIiEvDBstPT__", "void f<int>(_BitInt(sizeof (int*)))"},
|
{"_Z1fIiEvDBstPT__", "void f<int>(_BitInt(sizeof (int*)))"},
|
||||||
|
{"_Z6myfuncRDB8_S0_", "myfunc(_BitInt(8)&, _BitInt(8)&)"},
|
||||||
{"_Z4testI1A1BE1Cv", "C test<A, B>()"},
|
{"_Z4testI1A1BE1Cv", "C test<A, B>()"},
|
||||||
{"_Z4testI1A1BET0_T_S3_", "B test<A, B>(A, A)"},
|
{"_Z4testI1A1BET0_T_S3_", "B test<A, B>(A, A)"},
|
||||||
{"_ZN1SgtEi", "S::operator>(int)"},
|
{"_ZN1SgtEi", "S::operator>(int)"},
|
||||||
|
|||||||
Reference in New Issue
Block a user