Apparently I pseudo-ADHD'd away from this comment in the middle of writing it and never came back to finish it

This commit is contained in:
khyperia 2020-09-18 09:56:23 +02:00
parent 9697c22740
commit bc003cf6a2

View File

@ -539,10 +539,11 @@ fn dig_scalar_pointee_adt<'tcx>(
}
}
/// Handles #[spirv(storage_class="blah")]. Note this is only called in the scalar translation code, because this is only used for spooky builtin stuff, and we
/// Handles #[spirv(storage_class="blah")]. Note this is only called in the scalar translation code, because this is only
/// used for spooky builtin stuff, and we pinky promise to never have more than one pointer field in one of these.
// TODO: Enforce this is only used in spirv-std.
fn get_storage_class<'tcx>(cx: &CodegenCx<'tcx>, ty: TyAndLayout<'tcx>) -> Option<StorageClass> {
if let TyKind::Adt(adt, _substs) = ty.ty.kind() {
// TODO: Split out this attribute parsing
for attr in cx.tcx.get_attrs(adt.did) {
if let Some(SpirvAttribute::StorageClass(storage_class)) = parse_attr(cx, attr) {
return Some(storage_class);