HomePhabricator

[Clang][ASan] Introduce `-fsanitize-address-destructor-kind=` driver & frontend…

Authored by delcypher on Feb 9 2021, 11:02 PM.

Description

[Clang][ASan] Introduce -fsanitize-address-destructor-kind= driver & frontend option.

The new -fsanitize-address-destructor-kind= option allows control over how module
destructors are emitted by ASan.

The new option is consumed by both the driver and the frontend and is propagated into
codegen options by the frontend.

Both the legacy and new pass manager code have been updated to consume the new option
from the codegen options.

It would be nice if the new utility functions (AsanDtorKindToString and
AsanDtorKindFromString) could live in LLVM instead of Clang so they could be
consumed by other language frontends. Unfortunately that doesn't work because
the clang driver doesn't link against the LLVM instrumentation library.

rdar://71609176

Differential Revision: https://reviews.llvm.org/D96572

Details

Committed
delcypherFeb 25 2021, 12:02 PM
Differential Revision
D96572: [Clang][ASan] Introduce `-fsanitize-address-destructor-kind=` driver & frontend option.
Parents
rG169318088406: Add a nullptr check.
Branches
Unknown
Tags
Unknown