aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
authorMichael Buch <michaelbuch12@gmail.com>2023-11-28 21:24:19 +0000
committerGitHub <noreply@github.com>2023-11-28 21:24:19 +0000
commit4d5079c4dc0ce30ba36315a7c822255cd1eeb9fb (patch)
tree1b6ed53f5760ab4be92132454581b73b0b259687 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
parentec76d3975c42cb4906fe6e2b555f720d097cc49f (diff)
downloadllvm-4d5079c4dc0ce30ba36315a7c822255cd1eeb9fb.zip
llvm-4d5079c4dc0ce30ba36315a7c822255cd1eeb9fb.tar.gz
llvm-4d5079c4dc0ce30ba36315a7c822255cd1eeb9fb.tar.bz2
[libcxxabi][ItaniumDemangle] Demangle explicitly named object parameters (#72881)
The mangling for an explicitly named object was introduced in https://reviews.llvm.org/D140828 See following discussion for why a new mangling had to be introduced: https://github.com/itanium-cxx-abi/cxx-abi/issues/148 Since clang started emitting names with the new mangling, this patch implements support for demangling such names. The approach this patch takes is to add a new `ExplicitObjectParameter` node that will print the first parameter of a function declaration with a `this ` prefix, to reflect what was spelled out in source. Example: ``` void MyClass::func(this MyClass const& self); // _ZNH7MyClass4funcERKS_ ``` With this patch, the above demangles to: ``` _ZNH7MyClass4funcERKS_ -> MyClass::func(this MyClass const&) ``` Note that `func` is not marked as `const &`, since the function-qualifiers are now encoded as part of the explicit `this`. C++ doesn't allow specifying the function-qualifiers in the presence of an explicit object parameter, so this demangling is consistent with the source spelling.
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
0 files changed, 0 insertions, 0 deletions