32 for (
Value *Arg : FunctionArgs)
33 Types.push_back(Arg->getType());
38 const char *FunctionName,
46 Builder.CreateCall(Func, FunctionArgs);
50 const char *InsertFnName,
57 const char *InsertFnName,
60 if (isa<ReturnInst>(&
I))
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[]
A container for analyses that lazily runs them and caches their results.
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...
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...
GlobalVariable * CreateGlobalString(StringRef Str, const Twine &Name="", unsigned AddressSpace=0, Module *M=nullptr, bool AddNull=true)
Make a new global variable with initializer type i8*.
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.
void preserveSet()
Mark an analysis set as preserved.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
static Type * getVoidTy(LLVMContext &C)
LLVM Value Representation.
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.
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.
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.
std::string demangle(std::string_view MangledName)
Attempt to demangle a string using different demangling schemes.
PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM)