tsan: don't instrument __attribute__((naked)) functions
authorAnton Bikineev <bikineev@chromium.org>
Sat, 4 Apr 2020 19:55:10 +0000 (21:55 +0200)
committerAnton Bikineev <bikineev@chromium.org>
Thu, 9 Apr 2020 11:47:47 +0000 (13:47 +0200)
commit9e1ccec8d5296fe786308f791e49dbb9640f5090
tree0d4f7eba60cdbd87eeb82a7c1496313944d3a2f5
parentb761a6484d4035785565d41db540bfa7b5fd677d
tsan: don't instrument __attribute__((naked)) functions

Naked functions are required to not have compiler generated
prologues/epilogues, hence no instrumentation is needed for them.

Bugzilla: https://bugs.llvm.org/show_bug.cgi?id=45400

Differential Revision: https://reviews.llvm.org/D77477
llvm/lib/Transforms/Instrumentation/ThreadSanitizer.cpp
llvm/test/Instrumentation/ThreadSanitizer/tsan_basic.ll