22 #ifndef LLVM_LIB_TRANSFORMS_OBJCARC_ARCRUNTIMEENTRYPOINTS_H
23 #define LLVM_LIB_TRANSFORMS_OBJCARC_ARCRUNTIMEENTRYPOINTS_H
47 AutoreleaseRV(nullptr),
54 RetainAutorelease(nullptr),
55 RetainAutoreleaseRV(nullptr) { }
59 AutoreleaseRV =
nullptr;
62 RetainBlock =
nullptr;
63 Autorelease =
nullptr;
64 StoreStrong =
nullptr;
66 RetainAutorelease =
nullptr;
67 RetainAutoreleaseRV =
nullptr;
71 assert(TheModule !=
nullptr &&
"Not initialized.");
75 return getI8XRetI8XEntryPoint(AutoreleaseRV,
76 "objc_autoreleaseReturnValue",
true);
78 return getVoidRetI8XEntryPoint(Release,
"objc_release");
80 return getI8XRetI8XEntryPoint(Retain,
"objc_retain",
true);
82 return getI8XRetI8XEntryPoint(RetainBlock,
"objc_retainBlock",
false);
84 return getI8XRetI8XEntryPoint(Autorelease,
"objc_autorelease",
true);
86 return getI8XRetI8XXI8XEntryPoint(StoreStrong,
"objc_storeStrong");
88 return getI8XRetI8XEntryPoint(RetainRV,
89 "objc_retainAutoreleasedReturnValue",
true);
91 return getI8XRetI8XEntryPoint(RetainAutorelease,
"objc_retainAutorelease",
94 return getI8XRetI8XEntryPoint(RetainAutoreleaseRV,
95 "objc_retainAutoreleaseReturnValue",
true);
132 Attribute::NoUnwind);
138 Constant *getI8XRetI8XEntryPoint(Constant *&Decl, StringRef Name,
139 bool NoUnwind =
false) {
145 Type *Params[] = { I8X };
147 AttributeSet Attr = AttributeSet();
151 Attribute::NoUnwind);
156 Constant *getI8XRetI8XXI8XEntryPoint(Constant *&Decl, StringRef Name) {
163 Type *Params[] = { I8XX, I8X };
167 Attribute::NoUnwind);
168 Attr = Attr.addAttribute(C, 1, Attribute::NoCapture);
A Module instance is used to store all the information related to an LLVM module. ...
Class to represent function types.
static FunctionType * get(Type *Result, ArrayRef< Type * > Params, bool isVarArg)
This static method is the primary way of constructing a FunctionType.
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 class for using LLVM in a threaded context.
AttributeSet addAttribute(LLVMContext &C, unsigned Index, Attribute::AttrKind Kind) const
Add an attribute to the attribute set at the given index.
This is an important base class in LLVM.
static Type * getVoidTy(LLVMContext &C)
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
static PointerType * getUnqual(Type *ElementType)
This constructs a pointer to an object of the specified type in the generic address space (address sp...
static GCRegistry::Add< ShadowStackGC > C("shadow-stack","Very portable GC for uncooperative code generators")
Declarations for ObjC runtime functions and constants.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
StringRef - Represent a constant reference to a string, i.e.
static IntegerType * getInt8Ty(LLVMContext &C)
LLVMContext & getContext() const
Get the global data context.