[tsan] Add support for disable_sanitizer_instrumentation attribute
authorAlexander Potapenko <glider@google.com>
Tue, 17 Aug 2021 11:19:15 +0000 (13:19 +0200)
committerAlexander Potapenko <glider@google.com>
Mon, 23 Aug 2021 10:38:33 +0000 (12:38 +0200)
commit8300d52e8cbf757192d6b66efa537e15376bf756
tree100669b3fb4fa1dee92413cca9967023f164a6f8
parent4554b5bcf54d97274ad452cbb4de79cc4735ce51
[tsan] Add support for disable_sanitizer_instrumentation attribute

Unlike __attribute__((no_sanitize("thread"))), this one will cause TSan
to skip the entire function during instrumentation.

Depends on https://reviews.llvm.org/D108029

Differential Revision: https://reviews.llvm.org/D108202
clang/docs/ThreadSanitizer.rst
clang/test/CodeGen/sanitize-thread-disable.c [new file with mode: 0644]
llvm/lib/Transforms/Instrumentation/ThreadSanitizer.cpp