#include "llvm/IR/Analysis.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/InstIterator.h"
#include "llvm/IR/Module.h"
#include "llvm/Demangle/Demangle.h"
#include "llvm/Transforms/Instrumentation/RealtimeSanitizer.h"
usingnamespacellvm;
static SmallVector<Type *> getArgTypes(ArrayRef<Value *> FunctionArgs) { … }
static void insertCallBeforeInstruction(Function &Fn, Instruction &Instruction,
const char *FunctionName,
ArrayRef<Value *> FunctionArgs) { … }
static void insertCallAtFunctionEntryPoint(Function &Fn,
const char *InsertFnName,
ArrayRef<Value *> FunctionArgs) { … }
static void insertCallAtAllFunctionExitPoints(Function &Fn,
const char *InsertFnName,
ArrayRef<Value *> FunctionArgs) { … }
static PreservedAnalyses rtsanPreservedCFGAnalyses() { … }
static PreservedAnalyses runSanitizeRealtime(Function &Fn) { … }
static PreservedAnalyses runSanitizeRealtimeUnsafe(Function &Fn) { … }
RealtimeSanitizerPass::RealtimeSanitizerPass(
const RealtimeSanitizerOptions &Options) { … }
PreservedAnalyses RealtimeSanitizerPass::run(Function &Fn,
AnalysisManager<Function> &AM) { … }