This is an archive of the discontinued LLVM Phabricator instance.

[sanitizers] Remove unneeded MaybeCall*DefaultOptions() and nullptr checks
ClosedPublic

Authored by MaskRay on Sep 4 2020, 6:28 PM.

Details

Summary

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.

Diff Detail

Event Timeline

MaskRay created this revision.Sep 4 2020, 6:28 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 4 2020, 6:28 PM
MaskRay requested review of this revision.Sep 4 2020, 6:28 PM
vitalybuka accepted this revision.Sep 5 2020, 5:44 PM

clang-format: please reformat the code?

This revision is now accepted and ready to land.Sep 5 2020, 5:44 PM
MaskRay updated this revision to Diff 290116.Sep 5 2020, 6:39 PM

clang-format two const pointer* to const pointer *

MaskRay edited the summary of this revision. (Show Details)Sep 8 2020, 10:12 AM