(&self, span: Span, ty: Word)
| 250 | } |
| 251 | |
| 252 | fn declare_global(&self, span: Span, ty: Word) -> SpirvValue { |
| 253 | let ptr_ty = SpirvType::Pointer { pointee: ty }.def(span, self); |
| 254 | // FIXME(eddyb) figure out what the correct storage class is. |
| 255 | let result = self |
| 256 | .emit_global() |
| 257 | .variable(ptr_ty, None, StorageClass::Private, None) |
| 258 | .with_type(ptr_ty); |
| 259 | // TODO: These should be StorageClass::Private, so just zombie for now. |
| 260 | // FIXME(eddyb) why zombie? this looks like it should just work nowadays. |
| 261 | self.zombie_with_span(result.def_cx(self), span, "globals are not supported yet"); |
| 262 | result |
| 263 | } |
| 264 | } |
| 265 | |
| 266 | impl<'tcx> PreDefineMethods<'tcx> for CodegenCx<'tcx> { |
no test coverage detected