[libc++] Refactor of ASan annotation functions (#74023)
This commit refactors the ASan annotation functions in libc++ to reduce unnecessary code duplication. Additionally it adds a small optimization. - Eliminates two redundant function versions by utilizing the `[[maybe_unused]]` attribute and guarding function bodies with `#ifndef _LIBCPP_HAS_NO_ASAN`. - Introduces an additional guard to an auxiliary function, allowing the removal of a no-ops function body. This approach avoids relying on the optimizer for code elimination. Fixes #73043
parent
df2485b2
Please register or sign in to comment