26 EmptyModuleStatsTy = makeModuleStatsTy();
32 ArrayType *SanitizerStatReport::makeModuleStatsArrayTy() {
36 StructType *SanitizerStatReport::makeModuleStatsTy() {
39 makeModuleStatsArrayTy()});
46 IntegerType *IntPtrTy =
B.getIntPtrTy(M->getDataLayout());
60 M->getOrInsertFunction(
"__sanitizer_stat_report", StatReportTy);
63 EmptyModuleStatsTy, ModuleStatsGV,
This class represents lattice values for constants.
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.
A handy container for a FunctionType+Callee-pointer pair, which can be passed around as a single enti...
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)
static Constant * getNullValue(Type *Ty)
Constructor to create a '0' constant of arbitrary type.
Class to represent struct types.
LLVMContext & getContext() const
Get the global data context.
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),...
void replaceAllUsesWith(Value *V)
Change all uses of this to point to a new Value.
unsigned getBitWidth() const
Get the number of bits in this IntegerType.
Class to represent pointers.
static Constant * getBitCast(Constant *C, Type *Ty, bool OnlyIfReduced=false)
static Function * Create(FunctionType *Ty, LinkageTypes Linkage, unsigned AddrSpace, const Twine &N="", Module *M=nullptr)
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
The instances of the Type class are immutable: once they are created, they are never changed.
This file contains the declarations for the subclasses of Constant, which represent the different fla...
static Constant * get(ArrayType *T, ArrayRef< Constant * > V)
void eraseFromParent()
eraseFromParent - This method unlinks 'this' from the containing module and deletes it.
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.
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.
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.
FunctionCallee getOrInsertFunction(StringRef Name, FunctionType *T, AttributeList AttributeList)
Look up the specified function in the module symbol table.
static IntegerType * getInt32Ty(LLVMContext &C)
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).
SanitizerStatReport(Module *M)
PointerType * getType() const
Global values are always pointers.