diff options
author | Philip Pfaffe <philip.pfaffe@gmail.com> | 2019-01-16 09:28:01 +0000 |
---|---|---|
committer | Philip Pfaffe <philip.pfaffe@gmail.com> | 2019-01-16 09:28:01 +0000 |
commit | 6dbe225afee23c2c19fb4ae5ee688d9824be525d (patch) | |
tree | c760625f6686215a87ee2c1761ec0e7b56528300 /bindings | |
parent | b95047e99028adf0ee8e09b2e84283747fef9d55 (diff) | |
download | llvm-6dbe225afee23c2c19fb4ae5ee688d9824be525d.tar.gz |
[NewPM][TSan] Reiterate the TSan port
Summary:
Second iteration of D56433 which got reverted in rL350719. The problem
in the previous version was that we dropped the thunk calling the tsan init
function. The new version keeps the thunk which should appease dyld, but is not
actually OK wrt. the current semantics of function passes. Hence, add a
helper to insert the functions only on the first time. The helper
allows hooking into the insertion to be able to append them to the
global ctors list.
Reviewers: chandlerc, vitalybuka, fedor.sergeev, leonardchan
Subscribers: hiraditya, bollu, llvm-commits
Differential Revision: https://reviews.llvm.org/D56538
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351314 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'bindings')
-rw-r--r-- | bindings/go/llvm/InstrumentationBindings.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bindings/go/llvm/InstrumentationBindings.cpp b/bindings/go/llvm/InstrumentationBindings.cpp index 6ce43db620a2..c3b4f2eaf508 100644 --- a/bindings/go/llvm/InstrumentationBindings.cpp +++ b/bindings/go/llvm/InstrumentationBindings.cpp @@ -17,6 +17,7 @@ #include "llvm/IR/Module.h" #include "llvm/Transforms/Instrumentation.h" #include "llvm/Transforms/Instrumentation/MemorySanitizer.h" +#include "llvm/Transforms/Instrumentation/ThreadSanitizer.h" using namespace llvm; @@ -29,7 +30,7 @@ void LLVMAddAddressSanitizerModulePass(LLVMPassManagerRef PM) { } void LLVMAddThreadSanitizerPass(LLVMPassManagerRef PM) { - unwrap(PM)->add(createThreadSanitizerPass()); + unwrap(PM)->add(createThreadSanitizerLegacyPassPass()); } void LLVMAddMemorySanitizerLegacyPassPass(LLVMPassManagerRef PM) { |