Lines Matching full:address
1 //===-- Address.h - An aligned address -------------------------*- C++ -*-===//
27 class Address;
35 /// An abstract representation of an aligned address. This is designed to be an
37 /// operations on an address like loads and stores. In particular, it doesn't
59 inline RawAddress(Address Addr);
76 /// Return the type of the values stored in this address.
82 /// Return the address space that this address resides in.
98 /// Return address with different element type, but same pointer and
110 /// Like RawAddress, an abstract representation of an aligned address, but the
114 /// information necessary to perform IR operations on an address like loads and
119 /// An address may be either *raw*, meaning that it's an ordinary machine
127 /// which is applied when the address is finally accessed.
128 class Address {
135 /// information in Address makes it more convenient to work with Address
151 Address(std::nullptr_t) : ElementType(nullptr) {}
154 Address(llvm::Value *pointer, llvm::Type *elementType, CharUnits alignment,
163 Address(llvm::Value *BasePtr, llvm::Type *ElementType, CharUnits Alignment,
169 Address(RawAddress RawAddr)
176 static Address invalid() { return Address(nullptr); }
206 /// Return the type of the values stored in this address.
212 /// Return the address space that this address resides in.
236 Address setKnownNonNull() {
246 Address getResignedAddress(const CGPointerAuthInfo &NewInfo,
257 /// Return address with different pointer, but same element type and
259 Address withPointer(llvm::Value *NewPointer,
261 return Address(NewPointer, getElementType(), getAlignment(),
265 /// Return address with different alignment, but same pointer and element
267 Address withAlignment(CharUnits NewAlignment) const {
268 return Address(Pointer.getPointer(), getElementType(), NewAlignment,
272 /// Return address with different element type, but same pointer and
274 Address withElementType(llvm::Type *ElemTy) const {
276 return Address(getBasePointer(), ElemTy, getAlignment(),
279 Address A(*this);
285 inline RawAddress::RawAddress(Address Addr)
292 /// A specialization of Address that requires the address to be an
325 template <class U> inline U cast(CodeGen::Address addr) {
328 template <class U> inline bool isa(CodeGen::Address addr) {