pub enum TypeKind {
QPtr,
SpvInst {
spv_inst: Inst,
type_and_const_inputs: SmallVec<[TypeOrConst; 2]>,
},
SpvStringLiteralForExtInst,
}
Variants§
QPtr
“Quasi-pointer”, an untyped pointer-like abstract scalar that can represent
both memory locations (in any address space) and other kinds of locations
(e.g. SPIR-V OpVariable
s in non-memory “storage classes”).
This flexibility can be used to represent pointers from source languages that expect/are defined to operate on untyped memory (C, C++, Rust, etc.), that can then be legalized away (e.g. via inlining) or even emulated.
Information narrowing down how values of the type may be created/used
(e.g. “points to variable x
” or “accessed at offset y
”) can be found
attached as Attr
s on those Value
s (see Attr::QPtr
).
SpvInst
SpvStringLiteralForExtInst
The type of a ConstKind::SpvStringLiteralForExtInst
constant, i.e.
a SPIR-V OpString
with no actual type in SPIR-V.
Trait Implementations§
source§impl InternInCx<Type> for TypeKind
impl InternInCx<Type> for TypeKind
fn intern_in_cx(self, cx: &Context) -> Type
source§impl PartialEq for TypeKind
impl PartialEq for TypeKind
impl Eq for TypeKind
impl StructuralPartialEq for TypeKind
Auto Trait Implementations§
impl RefUnwindSafe for TypeKind
impl Send for TypeKind
impl Sync for TypeKind
impl Unpin for TypeKind
impl UnwindSafe for TypeKind
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.