ΒΆstd::pair<Function*, FunctionCallee>
getOrCreateSanitizerCtorAndInitFunctions(
llvm::Module& M,
llvm::StringRef CtorName,
llvm::StringRef InitName,
ArrayRef<llvm::Type*> InitArgTypes,
ArrayRef<llvm::Value*> InitArgs,
function_ref<void(llvm::Function*,
llvm::FunctionCallee)>
FunctionsCreatedCallback,
llvm::StringRef VersionCheckName =
llvm::StringRef())
std::pair<Function*, FunctionCallee>
getOrCreateSanitizerCtorAndInitFunctions(
llvm::Module& M,
llvm::StringRef CtorName,
llvm::StringRef InitName,
ArrayRef<llvm::Type*> InitArgTypes,
ArrayRef<llvm::Value*> InitArgs,
function_ref<void(llvm::Function*,
llvm::FunctionCallee)>
FunctionsCreatedCallback,
llvm::StringRef VersionCheckName =
llvm::StringRef())
Description
Creates sanitizer constructor function lazily. If a constructor and init function already exist, this function returns it. Otherwise it calls \c createSanitizerCtorAndInitFunctions. The FunctionsCreatedCallback is invoked in that case, passing the new Ctor and Init function.
Declared at: llvm/include/llvm/Transforms/Utils/ModuleUtils.h:63
Parameters
- llvm::Module& M
- llvm::StringRef CtorName
- llvm::StringRef InitName
- ArrayRef<llvm::Type*> InitArgTypes
- ArrayRef<llvm::Value*> InitArgs
- function_ref<void(llvm::Function*, llvm::FunctionCallee)> FunctionsCreatedCallback
- llvm::StringRef VersionCheckName = llvm::StringRef()
Returns
Returns pair of pointers to constructor, and init functions respectively.