Lines Matching full:pointer
9 // This class provides a simple wrapper for a pair of a pointer and an
32 // Indicates whether a pointer is known not to be null.
41 /// The pointer contained in this class is known to be unsigned.
51 RawAddress(llvm::Value *Pointer, llvm::Type *ElementType, CharUnits Alignment,
53 : PointerAndKnownNonNull(Pointer, IsKnownNonNull), in PointerAndKnownNonNull() argument
55 assert(Pointer != nullptr && "Pointer cannot be null"); in PointerAndKnownNonNull()
71 /// Return the type of the pointer value.
87 /// Return the IR name of the pointer value.
92 /// Return the alignment of this pointer.
98 /// Return address with different element type, but same pointer and
111 /// pointer contained in this class is possibly signed.
120 /// pointer, or *signed*, meaning that the pointer carries an embedded
121 /// pointer-authentication signature. Representing signed pointers directly in
125 /// every API that manipulates addresses. Pointer arithmetic on signed addresses
131 // The boolean flag indicates whether the pointer is known to be non-null.
132 llvm::PointerIntPair<llvm::Value *, 1, bool> Pointer; variable
134 /// The expected IR type of the pointer. Carrying accurate element type
141 /// The ptrauth information needed to authenticate the base pointer.
144 /// Offset from the base pointer. This is non-null only when the base
145 /// pointer is signed.
154 Address(llvm::Value *pointer, llvm::Type *elementType, CharUnits alignment,
156 : Pointer(pointer, IsKnownNonNull), ElementType(elementType), in Pointer() argument
158 assert(pointer != nullptr && "Pointer cannot be null"); in Pointer()
166 : Pointer(BasePtr, IsKnownNonNull), ElementType(ElementType), in Pointer() function
170 : Pointer(RawAddr.isValid() ? RawAddr.getPointer() : nullptr, in Address()
177 bool isValid() const { return Pointer.getPointer() != nullptr; } in isValid()
180 /// opaque "laundering" of the pointer.
182 assert(isValid() && "pointer isn't valid"); in replaceBasePointer()
183 assert(P->getType() == Pointer.getPointer()->getType() && in replaceBasePointer()
184 "Pointer's type changed"); in replaceBasePointer()
185 Pointer.setPointer(P); in replaceBasePointer()
186 assert(isValid() && "pointer is invalid after replacement"); in replaceBasePointer()
194 assert(isValid() && "pointer isn't valid"); in getBasePointer()
195 return Pointer.getPointer(); in getBasePointer()
198 /// Return the type of the pointer value.
202 llvm::cast<llvm::PointerType>(Pointer.getPointer()->getType()) in getType()
215 /// Return the IR name of the pointer value.
216 llvm::StringRef getName() const { return Pointer.getPointer()->getName(); } in getName()
230 /// Whether the pointer is known not to be null.
233 return (KnownNonNull_t)Pointer.getInt(); in isKnownNonNull()
238 Pointer.setInt(KnownNonNull); in setKnownNonNull()
249 /// Return the pointer contained in this class after authenticating it and
257 /// Return address with different pointer, but same element type and
265 /// Return address with different alignment, but same pointer and element
268 return Address(Pointer.getPointer(), getElementType(), NewAlignment, in withAlignment()
272 /// Return address with different element type, but same pointer and
298 ConstantAddress(llvm::Constant *pointer, llvm::Type *elementType, in ConstantAddress() argument
300 : RawAddress(pointer, elementType, alignment) {} in ConstantAddress()