14 #ifndef LLVM_TRANSFORMS_UTILS_MODULEUTILS_H 15 #define LLVM_TRANSFORMS_UTILS_MODULEUTILS_H 22 template <
typename T>
class ArrayRef;
50 ArrayRef<Type *> InitArgTypes);
57 Module &M, StringRef CtorName, StringRef InitName,
58 ArrayRef<Type *> InitArgTypes, ArrayRef<Value *> InitArgs,
59 StringRef VersionCheckName = StringRef());
69 Module &M, StringRef CtorName, StringRef InitName,
70 ArrayRef<Type *> InitArgTypes, ArrayRef<Value *> InitArgs,
71 function_ref<
void(Function *, Function *)> FunctionsCreatedCallback,
72 StringRef VersionCheckName = StringRef());
84 void appendToUsed(Module &M, ArrayRef<GlobalValue *> Values);
103 Module &M, SmallVectorImpl<Function *> &DeadComdatFunctions);
119 #endif // LLVM_TRANSFORMS_UTILS_MODULEUTILS_H void appendToCompilerUsed(Module &M, ArrayRef< GlobalValue *> Values)
Adds global values to the llvm.compiler.used list.
Type
MessagePack types as defined in the standard, with the exception of Integer being divided into a sign...
Function * declareSanitizerInitFunction(Module &M, StringRef InitName, ArrayRef< Type *> InitArgTypes)
void appendToGlobalDtors(Module &M, Function *F, int Priority, Constant *Data=nullptr)
Same as appendToGlobalCtors(), but for global dtors.
Function * checkSanitizerInterfaceFunction(Constant *FuncOrBitcast)
Function * getOrCreateInitFunction(Module &M, StringRef Name)
This class represents lattice values for constants.
bool nameUnamedGlobals(Module &M)
Rename all the anon globals in the module using a hash computed from the list of public globals in th...
amdgpu Simplify well known AMD library false Value Value const Twine & Name
void appendToUsed(Module &M, ArrayRef< GlobalValue *> Values)
Adds global values to the llvm.used list.
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.
std::string getUniqueModuleId(Module *M)
Produce a unique identifier for this module by taking the MD5 sum of the names of the module's strong...
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 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 * > getOrCreateSanitizerCtorAndInitFunctions(Module &M, StringRef CtorName, StringRef InitName, ArrayRef< Type *> InitArgTypes, ArrayRef< Value *> InitArgs, function_ref< void(Function *, Function *)> FunctionsCreatedCallback, StringRef VersionCheckName=StringRef())
Creates sanitizer constructor function lazily.