32 for (
Value *Arg : FunctionArgs)
38 const char *FunctionName,
50 const char *InsertFnName,
57 const char *InsertFnName,
93 if (
F.hasFnAttribute(Attribute::SanitizeRealtime))
96 if (
F.hasFnAttribute(Attribute::SanitizeRealtimeBlocking))
Expand Atomic instructions
Module.h This file contains the declarations for the Module class.
ModuleAnalysisManager MAM
static SmallVector< Type * > getArgTypes(ArrayRef< Value * > FunctionArgs)
static PreservedAnalyses runSanitizeRealtime(Function &Fn)
static PreservedAnalyses rtsanPreservedCFGAnalyses()
static PreservedAnalyses runSanitizeRealtimeBlocking(Function &Fn)
static void insertCallAtAllFunctionExitPoints(Function &Fn, const char *InsertFnName, ArrayRef< Value * > FunctionArgs)
static void insertCallBeforeInstruction(Function &Fn, Instruction &Instruction, const char *FunctionName, ArrayRef< Value * > FunctionArgs)
const char kRtsanInitName[]
static void insertCallAtFunctionEntryPoint(Function &Fn, const char *InsertFnName, ArrayRef< Value * > FunctionArgs)
const char kRtsanModuleCtorName[]
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
const Instruction & front() const
Represents analyses that only rely on functions' control flow.
A handy container for a FunctionType+Callee-pointer pair, which can be passed around as a single enti...
static LLVM_ABI FunctionType * get(Type *Result, ArrayRef< Type * > Params, bool isVarArg)
This static method is the primary way of constructing a FunctionType.
const BasicBlock & front() const
LLVMContext & getContext() const
getContext - Return a reference to the LLVMContext associated with this function.
Module * getParent()
Get the module that this global value is contained inside of...
CallInst * CreateCall(FunctionType *FTy, Value *Callee, ArrayRef< Value * > Args={}, const Twine &Name="", MDNode *FPMathTag=nullptr)
This provides a uniform API for creating instructions and inserting them into a basic block: either a...
This is an important class for using LLVM in a threaded context.
A Module instance is used to store all the information related to an LLVM module.
FunctionCallee getOrInsertFunction(StringRef Name, FunctionType *T, AttributeList AttributeList)
Look up the specified function in the module symbol table.
A set of analyses that are preserved following a run of a transformation pass.
static PreservedAnalyses none()
Convenience factory function for the empty preserved set.
PreservedAnalyses & preserveSet()
Mark an analysis set as preserved.
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
static LLVM_ABI Type * getVoidTy(LLVMContext &C)
LLVM Value Representation.
LLVM_ABI StringRef getName() const
Return a constant reference to the value's name.
Pass manager infrastructure for declaring and invalidating analyses.
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI std::pair< Function *, FunctionCallee > getOrCreateSanitizerCtorAndInitFunctions(Module &M, StringRef CtorName, StringRef InitName, ArrayRef< Type * > InitArgTypes, ArrayRef< Value * > InitArgs, function_ref< void(Function *, FunctionCallee)> FunctionsCreatedCallback, StringRef VersionCheckName=StringRef(), bool Weak=false)
Creates sanitizer constructor function lazily.
bool isa(const From &Val)
isa<X> - Return true if the parameter to the template is an instance of one of the template type argu...
LLVM_ABI 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.
DEMANGLE_ABI std::string demangle(std::string_view MangledName)
Attempt to demangle a string using different demangling schemes.
AnalysisManager< Module > ModuleAnalysisManager
Convenience typedef for the Module analysis manager.
LLVM_ABI PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM)