[all-commits] [llvm/llvm-project] 2d7fd3: [sanitizers] Remove unneeded MaybeCall*DefaultOpti...

Fangrui Song via All-commits all-commits at lists.llvm.org
Tue Sep 8 10:18:41 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 2d7fd38cf7db18edbbfa0e6dfb7454a255171867
      https://github.com/llvm/llvm-project/commit/2d7fd38cf7db18edbbfa0e6dfb7454a255171867
  Author: Fangrui Song <i at maskray.me>
  Date:   2020-09-08 (Tue, 08 Sep 2020)

  Changed paths:
    M compiler-rt/lib/asan/asan_flags.cpp
    M compiler-rt/lib/asan/asan_interface_internal.h
    M compiler-rt/lib/cfi/cfi.cpp
    M compiler-rt/lib/hwasan/hwasan.cpp
    M compiler-rt/lib/lsan/lsan.cpp
    M compiler-rt/lib/lsan/lsan_common.cpp
    M compiler-rt/lib/msan/msan.cpp
    M compiler-rt/lib/msan/msan_interface_internal.h
    M compiler-rt/lib/tsan/rtl/tsan_flags.cpp
    M compiler-rt/lib/ubsan/ubsan_flags.cpp
    M compiler-rt/lib/ubsan/ubsan_flags.h

  Log Message:
  -----------
  [sanitizers] Remove unneeded MaybeCall*DefaultOptions() and nullptr checks

D28596 added SANITIZER_INTERFACE_WEAK_DEF which can guarantee `*_default_options` are always defined.
The weak attributes on the `__{asan,lsan,msan,ubsan}_default_options` declarations can thus be removed.

`MaybeCall*DefaultOptions` no longer need nullptr checks, so their call sites can just be replaced by `__*_default_options`.

Reviewed By: #sanitizers, vitalybuka

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




More information about the All-commits mailing list