llvm-project
b1a3b4cd - [Clang][AllocToken] Support TypeFuncHash and TypeFuncHashPointerSplit modes (#228492)

Commit
39 days ago
[Clang][AllocToken] Support TypeFuncHash and TypeFuncHashPointerSplit modes (#228492) Extend Clang to support the `-falloc-token-mode=typefunchash` and `-falloc-token-mode=typefunchashpointersplit` modes, which were added to LLVM in #227686. In these modes, CodeGen attaches the qualified name of the enclosing function as the third operand of !alloc_token metadata. Allocations outside functions use an empty function name. When type inference fails, metadata is still emitted with an empty type name, so that a function-based token can be assigned. This allows distinguishing allocations that would otherwise all share the fallback token. Like the Increment and Random modes, `__builtin_infer_alloc_token()` is not supported in constant expressions under these modes.
Author
Parents
Loading