mirror-llvm-project/libcxxabi
Marco Elver fb6f1bde00
[ItaniumDemangle] Strip __alloc_token_ to transparently demangle allocation functions (#191048)
Update the Itanium demangler to recognize and strip `__alloc_token_`
prefixes introduced by AllocToken instrumentation [1]. This ensures that
instrumented allocation functions (e.g., `__alloc_token__Znwm`) demangle
back to their original source-level names (e.g., `operator new(unsigned
long)`) with a suffix `(.alloc_token)` indicating their non-standard
origin.

Since AllocToken is intended to be transparent to users who continue to
use `operator new` as before, the demangled name should reflect this
reality instead of confusing users with internal instrumentation names
in stack traces or symbolization output.

Synchronize changes across llvm and libcxxabi copies.

[1] https://clang.llvm.org/docs/AllocToken.html

Original RFC: https://discourse.llvm.org/t/rfc-a-framework-for-allocator-partitioning-hints/87434
2026-04-22 17:57:30 +02:00
..
cmake
fuzz
include Prepare libcxx and libcxxabi for pointer field protection. 2026-03-25 15:51:35 -07:00
lib
src [ItaniumDemangle] Strip __alloc_token_ to transparently demangle allocation functions (#191048) 2026-04-22 17:57:30 +02:00
test [ItaniumDemangle] Strip __alloc_token_ to transparently demangle allocation functions (#191048) 2026-04-22 17:57:30 +02:00
www
.clang-format
.gitignore
CMakeLists.txt [Runtimes] Introduce variables containing resource dir paths (#177953) 2026-04-02 10:32:14 +00:00
CREDITS.TXT
LICENSE.TXT