[asan] Delay creation of asan ctor.
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Fri, 24 Mar 2017 20:42:15 +0000 (20:42 +0000)
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Fri, 24 Mar 2017 20:42:15 +0000 (20:42 +0000)
commit64e872a91f217964dd899e2c8a4a6426f166a4dd
tree3381935e7d871e5b419b65c99b3f16825fbfac80
parentb5d23271e2597ab5298244f45a65032e99e79af3
[asan] Delay creation of asan ctor.

Create the constructor in the module pass.
This in needed for the GC-friendly globals change, where the constructor can be
put in a comdat  in some cases, but we don't know about that in the function
pass.

llvm-svn: 298731
llvm/include/llvm/Transforms/Utils/ModuleUtils.h
llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
llvm/lib/Transforms/Utils/ModuleUtils.cpp
llvm/test/Instrumentation/AddressSanitizer/instrument_load_then_store.ll