14 #ifndef LLVM_TRANSFORMS_UTILS_MODULEUTILS_H
15 #define LLVM_TRANSFORMS_UTILS_MODULEUTILS_H
30 template <
class PtrType>
class SmallPtrSetImpl;
44 SmallPtrSetImpl<GlobalValue *> &Set,
58 Module &M, StringRef CtorName, StringRef InitName,
59 ArrayRef<Type *> InitArgTypes, ArrayRef<Value *> InitArgs);
62 #endif // LLVM_TRANSFORMS_UTILS_MODULEUTILS_H
Function * checkSanitizerInterfaceFunction(Constant *FuncOrBitcast)
void appendToGlobalCtors(Module &M, Function *F, int Priority)
Append F to the list of global ctors of module M with the given Priority.
void appendToGlobalDtors(Module &M, Function *F, int Priority)
Same as appendToGlobalCtors(), but for global dtors.
std::pair< Function *, Function * > createSanitizerCtorAndInitFunctions(Module &M, StringRef CtorName, StringRef InitName, ArrayRef< Type * > InitArgTypes, ArrayRef< Value * > InitArgs)
Creates sanitizer constructor function, and calls sanitizer's init function from it.
GlobalVariable * collectUsedGlobalVariables(Module &M, SmallPtrSetImpl< GlobalValue * > &Set, bool CompilerUsed)
Given "llvm.used" or "llvm.compiler.used" as a global name, collect the initializer elements of that ...