pub enum TypeCtor {
QPtr,
SpvInst(Inst),
SpvStringLiteralForExtInst,
}
Expand description
Type
“constructor”: a TypeDef
wiithout any TypeCtorArg
s (Type
s/Const
s).
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(Inst)
SpvStringLiteralForExtInst
The type of a ConstCtor::SpvStringLiteralForExtInst
constant, i.e.
a SPIR-V OpString
with no actual type in SPIR-V.
Trait Implementations§
source§impl PartialEq<TypeCtor> for TypeCtor
impl PartialEq<TypeCtor> for TypeCtor
impl Eq for TypeCtor
impl StructuralEq for TypeCtor
impl StructuralPartialEq for TypeCtor
Auto Trait Implementations§
impl RefUnwindSafe for TypeCtor
impl Send for TypeCtor
impl Sync for TypeCtor
impl Unpin for TypeCtor
impl UnwindSafe for TypeCtor
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
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.