[PATCH] D148465: [Demangle] demangle builtin type transformations
Congcong Cai via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 16 06:55:25 PDT 2023
HerrCai0907 created this revision.
Herald added a project: All.
HerrCai0907 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
https://reviews.llvm.org/D116203 introduced several compiler builtin
equivalents of the unary type traits. In some cases (e.g. template) those
builtin will be dependent and need to be mangle.
This patch add the check for `u{builtin}I{type}E` to demangle it.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D148465
Files:
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
@@ -3885,6 +3885,18 @@
// but the exception to that exception is vendor extended types (Itanium C++
// ABI 5.9.1).
Result = make<NameType>(Res);
+
+ // demangle builtin type transformations introduced in https://reviews.llvm.org/D116203
+ if (consumeIf('I')) {
+ Node *BaseType = parseType();
+ if (BaseType == nullptr)
+ return nullptr;
+ Result = make<FunctionEncoding>(nullptr, Result, makeNodeArray(&BaseType, &BaseType+1),
+ nullptr, Qualifiers::QualNone,
+ FunctionRefQual::FrefQualNone);
+ if (!consumeIf('E'))
+ return nullptr;
+ }
break;
}
case 'D':
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148465.514003.patch
Type: text/x-patch
Size: 920 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230416/77513e44/attachment.bin>
More information about the llvm-commits
mailing list