[all-commits] [llvm/llvm-project] 02f4b3: [libc++] Refactor of ASan annotation functions (#7...

Tacet via All-commits all-commits at lists.llvm.org
Tue Dec 5 10:27:21 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 02f4b36ad5f2f97ff63259e38244da8fcd5a205e
      https://github.com/llvm/llvm-project/commit/02f4b36ad5f2f97ff63259e38244da8fcd5a205e
  Author: Tacet <4922191+AdvenamTacet at users.noreply.github.com>
  Date:   2023-12-05 (Tue, 05 Dec 2023)

  Changed paths:
    M libcxx/include/deque
    M libcxx/include/vector

  Log Message:
  -----------
  [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




More information about the All-commits mailing list