[libcxx-commits] [libcxxabi] [llvm] [ItaniumDemangle] Strip __alloc_token_ to transparently demangle allocation functions (PR #191048)

Marco Elver via libcxx-commits libcxx-commits at lists.llvm.org
Thu Apr 9 09:57:18 PDT 2026


melver wrote:

> This needs review from regular @reviewers-libcxxabi folks. Have you considered `.alloc_token` suffix instead?
> 
> ```
> % echo '_Znwm.xxx' | c++filt
> operator new(unsigned long) [clone .xxx]
> ```

You mean to rewrite (in the demangler) e.g. `__alloc_token__Znwm`  to `_Znwm.alloc_token`, which is then translated as `operator new(unsigned long) (.alloc_token)` to indicate the underlying function is non-standard?

I suppose it's useful to have this information for debugging, but if the demangler's purpose is to translate mangled names back to source-level names then maybe it's redundant. Preferences? 

https://github.com/llvm/llvm-project/pull/191048


More information about the libcxx-commits mailing list