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)
commit4e21d7aff9187de570062ae6e58f42205466b93b
tree3ee7d6b22ddef9dec21f732c3904534f9df6c363
parent00157f3ae8298ae81c017abc65760fb3fa604f8a
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236627 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Transforms/Utils/ModuleUtils.h
lib/Transforms/Utils/ModuleUtils.cpp