llvm::PointerIntPair<llvm::Value *, 1, bool> PointerAndKnownNonNull;
44llvm::Type *ElementType;
53: PointerAndKnownNonNull(
Pointer, IsKnownNonNull),
54ElementType(ElementType), Alignment(Alignment) {
55assert(
Pointer!=
nullptr&&
"Pointer cannot be null");
56assert(ElementType !=
nullptr&&
"Element type cannot be null");
63 returnPointerAndKnownNonNull.getPointer() !=
nullptr;
68 returnPointerAndKnownNonNull.getPointer();
84 return getType()->getAddressSpace();
132llvm::PointerIntPair<llvm::Value *, 1, bool>
Pointer;
137llvm::Type *ElementType =
nullptr;
146llvm::Value *Offset =
nullptr;
151 Address(std::nullptr_t) : ElementType(nullptr) {}
156:
Pointer(pointer, IsKnownNonNull), ElementType(elementType),
157Alignment(alignment) {
158assert(pointer !=
nullptr&&
"Pointer cannot be null");
159assert(elementType !=
nullptr&&
"Element type cannot be null");
160assert(!alignment.
isZero() &&
"Alignment cannot be zero");
166:
Pointer(BasePtr, IsKnownNonNull), ElementType(ElementType),
167Alignment(Alignment), PtrAuthInfo(PtrAuthInfo), Offset(Offset) {}
182assert(
isValid() &&
"pointer isn't valid");
183assert(
P->getType() ==
Pointer.getPointer()->getType() &&
184 "Pointer's type changed");
186assert(
isValid() &&
"pointer is invalid after replacement");
194assert(
isValid() &&
"pointer isn't valid");
200 returnllvm::PointerType::get(
202llvm::cast<llvm::PointerType>(
Pointer.getPointer()->getType())
203->getAddressSpace());
224 "this funcion shouldn't be called when there is no offset");
254 returnemitRawPointerSlow(CGF);
280A.ElementType = ElemTy;
286: PointerAndKnownNonNull(Addr.isValid() ? Addr.getBasePointer() : nullptr,
287Addr.isValid() ? Addr.isKnownNonNull()
289ElementType(Addr.isValid() ? Addr.getElementType() : nullptr),
290Alignment(Addr.isValid() ? Addr.getAlignment() :
CharUnits::Zero()) {}
300:
RawAddress(pointer, elementType, alignment) {}
315 returnllvm::isa<llvm::Constant>(addr.
getPointer());
326 returnU::castImpl(addr);
329 returnU::isaImpl(addr);
C Language Family Type Representation.
CharUnits - This is an opaque type for sizes expressed in character units.
bool isZero() const
isZero - Test whether the quantity equals zero.
Like RawAddress, an abstract representation of an aligned address, but the pointer contained in this ...
llvm::Value * getBasePointer() const
llvm::Value * emitRawPointer(CodeGenFunction &CGF) const
Return the pointer contained in this class after authenticating it and adding offset to it if necessa...
CharUnits getAlignment() const
llvm::Type * getElementType() const
Return the type of the values stored in this address.
void setPointerAuthInfo(const CGPointerAuthInfo &Info)
Address withPointer(llvm::Value *NewPointer, KnownNonNull_t IsKnownNonNull) const
Return address with different pointer, but same element type and alignment.
Address withElementType(llvm::Type *ElemTy) const
Return address with different element type, but same pointer and alignment.
unsigned getAddressSpace() const
Return the address space that this address resides in.
Address(llvm::Value *pointer, llvm::Type *elementType, CharUnits alignment, KnownNonNull_t IsKnownNonNull=NotKnownNonNull)
KnownNonNull_t isKnownNonNull() const
Whether the pointer is known not to be null.
Address setKnownNonNull()
void setAlignment(CharUnits Value)
Address withAlignment(CharUnits NewAlignment) const
Return address with different alignment, but same pointer and element type.
llvm::Value * getOffset() const
void replaceBasePointer(llvm::Value *P)
This function is used in situations where the caller is doing some sort of opaque "laundering" of the...
Address(RawAddress RawAddr)
llvm::StringRef getName() const
Return the IR name of the pointer value.
Address getResignedAddress(const CGPointerAuthInfo &NewInfo, CodeGenFunction &CGF) const
const CGPointerAuthInfo & getPointerAuthInfo() const
Address(llvm::Value *BasePtr, llvm::Type *ElementType, CharUnits Alignment, CGPointerAuthInfo PtrAuthInfo, llvm::Value *Offset, KnownNonNull_t IsKnownNonNull=NotKnownNonNull)
void setElementType(llvm::Type *Ty)
llvm::PointerType * getType() const
Return the type of the pointer value.
CodeGenFunction - This class organizes the per-function state that is used while generating LLVM code...
A specialization of Address that requires the address to be an LLVM Constant.
static ConstantAddress castImpl(RawAddress addr)
ConstantAddress withElementType(llvm::Type *ElemTy) const
static bool isaImpl(RawAddress addr)
static ConstantAddress invalid()
ConstantAddress(llvm::Constant *pointer, llvm::Type *elementType, CharUnits alignment)
llvm::Constant * getPointer() const
An abstract representation of an aligned address.
RawAddress withElementType(llvm::Type *ElemTy) const
Return address with different element type, but same pointer and alignment.
llvm::StringRef getName() const
Return the IR name of the pointer value.
llvm::PointerType * getType() const
Return the type of the pointer value.
CharUnits getAlignment() const
Return the alignment of this pointer.
llvm::Type * getElementType() const
Return the type of the values stored in this address.
KnownNonNull_t isKnownNonNull() const
RawAddress(llvm::Value *Pointer, llvm::Type *ElementType, CharUnits Alignment, KnownNonNull_t IsKnownNonNull=NotKnownNonNull)
llvm::Value * getPointer() const
unsigned getAddressSpace() const
Return the address space that this address resides in.
static RawAddress invalid()
RawAddress(std::nullptr_t)
The JSON file list parser is used to communicate input to InstallAPI.
bool isa(CodeGen::Address addr)
U cast(CodeGen::Address addr)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4