14 #ifndef LLVM_TRANSFORMS_UTILS_MODULEUTILS_H
15 #define LLVM_TRANSFORMS_UTILS_MODULEUTILS_H
22 template <
typename T>
class ArrayRef;
54 Module &M, StringRef CtorName, StringRef InitName,
55 ArrayRef<Type *> InitArgTypes, ArrayRef<Value *> InitArgs,
56 StringRef VersionCheckName = StringRef());
63 void appendToUsed(Module &M, ArrayRef<GlobalValue *> Values);
82 Module &M, SmallVectorImpl<Function *> &DeadComdatFunctions);
86 #endif // LLVM_TRANSFORMS_UTILS_MODULEUTILS_H
void appendToGlobalDtors(Module &M, Function *F, int Priority, Constant *Data=nullptr)
Same as appendToGlobalCtors(), but for global dtors.
Function * checkSanitizerInterfaceFunction(Constant *FuncOrBitcast)
void appendToCompilerUsed(Module &M, ArrayRef< GlobalValue * > Values)
Adds global values to the llvm.compiler.used list.
bool nameUnamedGlobals(Module &M)
Rename all the anon globals in the module using a hash computed from the list of public globals in th...
void filterDeadComdatFunctions(Module &M, SmallVectorImpl< Function * > &DeadComdatFunctions)
Filter out potentially dead comdat functions where other entries keep the entire comdat group alive...
std::pair< Function *, Function * > createSanitizerCtorAndInitFunctions(Module &M, StringRef CtorName, StringRef InitName, ArrayRef< Type * > InitArgTypes, ArrayRef< Value * > InitArgs, StringRef VersionCheckName=StringRef())
Creates sanitizer constructor function, and calls sanitizer's init function from it.
void appendToGlobalCtors(Module &M, Function *F, int Priority, Constant *Data=nullptr)
Append F to the list of global ctors of module M with the given Priority.
void appendToUsed(Module &M, ArrayRef< GlobalValue * > Values)
Adds global values to the llvm.used list.