Implement `createSanitizerCtor`, common helper function for all sanitizers
authorIsmail Pazarbasi <ismail.pazarbasi@gmail.com>
Wed, 6 May 2015 18:48:22 +0000 (18:48 +0000)
committerIsmail Pazarbasi <ismail.pazarbasi@gmail.com>
Wed, 6 May 2015 18:48:22 +0000 (18:48 +0000)
commit56ccf1c9d598b6038e974a799a350eeaf0dc525d
treed1ab0b6df3988187c1257699d408f6fd38604918
parentd1b38c4b0bf4c912ed3251b45c2168b6f190d0b2
Implement `createSanitizerCtor`, common helper function for all sanitizers

Summary:
This helper function creates a ctor function, which calls sanitizer's
init function with given arguments. This constructor is then expected
to be added to module's ctors. The patch helps unifying how sanitizer
constructor functions are created, and how init functions are called
across all sanitizers.

Reviewers: kcc, samsonov

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D8777

llvm-svn: 236627
llvm/include/llvm/Transforms/Utils/ModuleUtils.h
llvm/lib/Transforms/Utils/ModuleUtils.cpp