diff options
| author | Larry Meadows <lmeadows@amd.com> | 2025-06-25 12:06:11 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-25 15:06:11 -0400 |
| commit | 20f56d140909a01c74e9981835373eaab6021af9 (patch) | |
| tree | d9b2eeab6f2a7066dfaa3bbf9708607c42fe9fe0 /libcxxabi | |
| parent | c873e5f87d84bab700a297af8cdb76b2bd3ece88 (diff) | |
[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.
Diffstat (limited to 'libcxxabi')
| -rw-r--r-- | libcxxabi/src/demangle/ItaniumDemangle.h | 4 | ||||
| -rw-r--r-- | libcxxabi/test/DemangleTestCases.inc | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/libcxxabi/src/demangle/ItaniumDemangle.h b/libcxxabi/src/demangle/ItaniumDemangle.h index 4e7f92dd1991..b306b2013445 100644 --- a/libcxxabi/src/demangle/ItaniumDemangle.h +++ b/libcxxabi/src/demangle/ItaniumDemangle.h @@ -4468,7 +4468,9 @@ Node *AbstractManglingParser<Derived, Alloc>::parseType() { return nullptr; if (!consumeIf('_')) 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 case 'i': diff --git a/libcxxabi/test/DemangleTestCases.inc b/libcxxabi/test/DemangleTestCases.inc index 1e3f7459deaa..2721d2aa5504 100644 --- a/libcxxabi/test/DemangleTestCases.inc +++ b/libcxxabi/test/DemangleTestCases.inc @@ -6,6 +6,7 @@ {"_Z1fDU10_", "f(unsigned _BitInt(10))"}, {"_Z1fIfEvDUstPT__", "void f<float>(unsigned _BitInt(sizeof (float*)))"}, {"_Z1fIiEvDBstPT__", "void f<int>(_BitInt(sizeof (int*)))"}, +{"_Z6myfuncRDB8_S0_", "myfunc(_BitInt(8)&, _BitInt(8)&)"}, {"_Z4testI1A1BE1Cv", "C test<A, B>()"}, {"_Z4testI1A1BET0_T_S3_", "B test<A, B>(A, A)"}, {"_ZN1SgtEi", "S::operator>(int)"}, |
