[PATCH] D140359: [ItaniumDemangle] Fix substitution failure of _BitInt
Senran Zhang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 19 17:49:54 PST 2022
zsrkmyn created this revision.
Herald added a project: All.
zsrkmyn requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
https://reviews.llvm.org/D140359
Files:
libcxxabi/src/demangle/ItaniumDemangle.h
libcxxabi/test/test_demangle.pass.cpp
llvm/include/llvm/Demangle/ItaniumDemangle.h
Index: llvm/include/llvm/Demangle/ItaniumDemangle.h
===================================================================
--- llvm/include/llvm/Demangle/ItaniumDemangle.h
+++ llvm/include/llvm/Demangle/ItaniumDemangle.h
@@ -3926,7 +3926,8 @@
return nullptr;
if (!consumeIf('_'))
return nullptr;
- return make<BitIntType>(Size, Signed);
+ Result = make<BitIntType>(Size, Signed);
+ break;
}
// ::= Di # char32_t
case 'i':
Index: libcxxabi/test/test_demangle.pass.cpp
===================================================================
--- libcxxabi/test/test_demangle.pass.cpp
+++ libcxxabi/test/test_demangle.pass.cpp
@@ -33,6 +33,7 @@
{"_Z1Av", "A()"},
{"_Z1A1B1C", "A(B, C)"},
{"_Z1fDB3_", "f(_BitInt(3))"},
+ {"_Z1fDB3_S_", "f(_BitInt(3), _BitInt(3))"},
{"_Z1fDU10_", "f(unsigned _BitInt(10))"},
{"_Z1fIfEvDUstPT__", "void f<float>(unsigned _BitInt(sizeof (float*)))"},
{"_Z1fIiEvDBstPT__", "void f<int>(_BitInt(sizeof (int*)))"},
Index: libcxxabi/src/demangle/ItaniumDemangle.h
===================================================================
--- libcxxabi/src/demangle/ItaniumDemangle.h
+++ libcxxabi/src/demangle/ItaniumDemangle.h
@@ -3926,7 +3926,8 @@
return nullptr;
if (!consumeIf('_'))
return nullptr;
- return make<BitIntType>(Size, Signed);
+ Result = make<BitIntType>(Size, Signed);
+ break;
}
// ::= Di # char32_t
case 'i':
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140359.484142.patch
Type: text/x-patch
Size: 1516 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221220/9a7ed3b3/attachment.bin>
More information about the llvm-commits
mailing list