27 EmptyModuleStatsTy = makeModuleStatsTy();
33 ArrayType *SanitizerStatReport::makeModuleStatsArrayTy() {
37 StructType *SanitizerStatReport::makeModuleStatsTy() {
40 makeModuleStatsArrayTy()});
61 "__sanitizer_stat_report", StatReportTy);
64 EmptyModuleStatsTy, ModuleStatsGV,
102 "__sanitizer_stat_init", StatInitTy);
A Module instance is used to store all the information related to an LLVM module. ...
static Constant * getAnon(ArrayRef< Constant * > V, bool Packed=false)
Return an anonymous struct that has the specified elements.
void create(IRBuilder<> &B, SanitizerStatKind SK)
Generates code into B that increments a location-specific counter tagged with the given sanitizer kin...
static Constant * getGetElementPtr(Type *Ty, Constant *C, ArrayRef< Constant * > IdxList, bool InBounds=false, Optional< unsigned > InRangeIndex=None, Type *OnlyIfReducedTy=nullptr)
Getelementptr form.
static Constant * getIntToPtr(Constant *C, Type *Ty, bool OnlyIfReduced=false)
const Function * getParent() const
Return the enclosing method, or null if none.
unsigned getBitWidth() const
Get the number of bits in this IntegerType.
static Constant * getNullValue(Type *Ty)
Constructor to create a '0' constant of arbitrary type.
IntegerType * getInt32Ty()
Fetch the type representing a 32-bit integer.
Class to represent struct types.
This provides a uniform API for creating instructions and inserting them into a basic block: either a...
IntegerType * getIntPtrTy(const DataLayout &DL, unsigned AddrSpace=0)
Fetch the type representing a pointer to an integer value.
void eraseFromParent() override
eraseFromParent - This method unlinks 'this' from the containing module and deletes it...
Type * getVoidTy()
Fetch the type representing void.
Class to represent function types.
Class to represent array types.
static FunctionType * get(Type *Result, ArrayRef< Type * > Params, bool isVarArg)
This static method is the primary way of constructing a FunctionType.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
static GCRegistry::Add< OcamlGC > B("ocaml","ocaml 3.10-compatible GC")
void replaceAllUsesWith(Value *V)
Change all uses of this to point to a new Value.
Class to represent pointers.
static Constant * getBitCast(Constant *C, Type *Ty, bool OnlyIfReduced=false)
Constant * getOrInsertFunction(StringRef Name, FunctionType *T, AttributeSet AttributeList)
Look up the specified function in the module symbol table.
The instances of the Type class are immutable: once they are created, they are never changed...
This is an important base class in LLVM.
This file contains the declarations for the subclasses of Constant, which represent the different fla...
static Constant * get(ArrayType *T, ArrayRef< Constant * > V)
void finish()
Finalize module stats array and add global constructor to register it.
static Type * getVoidTy(LLVMContext &C)
static BasicBlock * Create(LLVMContext &Context, const Twine &Name="", Function *Parent=nullptr, BasicBlock *InsertBefore=nullptr)
Creates a new BasicBlock.
Class to represent integer types.
PointerType * getInt8PtrTy(unsigned AddrSpace=0)
Fetch the type representing a pointer to an 8-bit integer value.
static PointerType * getInt8PtrTy(LLVMContext &C, unsigned AS=0)
static StructType * get(LLVMContext &Context, ArrayRef< Type * > Elements, bool isPacked=false)
This static method is the primary way to create a literal StructType.
Module.h This file contains the declarations for the Module class.
BasicBlock * GetInsertBlock() const
static Constant * get(Type *Ty, uint64_t V, bool isSigned=false)
If Ty is a vector type, return a Constant with a splat of the given value.
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.
PointerType * getType() const
Global values are always pointers.
const DataLayout & getDataLayout() const
Get the data layout for the module's target platform.
static IntegerType * getInt32Ty(LLVMContext &C)
CallInst * CreateCall(Value *Callee, ArrayRef< Value * > Args=None, const Twine &Name="", MDNode *FPMathTag=nullptr)
static ArrayType * get(Type *ElementType, uint64_t NumElements)
This static method is the primary way to construct an ArrayType.
Rename collisions when linking (static functions).
Module * getParent()
Get the module that this global value is contained inside of...
static Function * Create(FunctionType *Ty, LinkageTypes Linkage, const Twine &N="", Module *M=nullptr)
SanitizerStatReport(Module *M)
LLVMContext & getContext() const
Get the global data context.