(&self, alloc: ConstAllocation<'tcx>, ty: Word)
| 383 | } |
| 384 | |
| 385 | pub fn create_const_alloc(&self, alloc: ConstAllocation<'tcx>, ty: Word) -> SpirvValue { |
| 386 | // println!( |
| 387 | // "Creating const alloc of type {} with {} bytes", |
| 388 | // self.debug_type(ty), |
| 389 | // alloc.len() |
| 390 | // ); |
| 391 | let mut offset = Size::ZERO; |
| 392 | let result = self.create_const_alloc2(alloc, &mut offset, ty); |
| 393 | assert_eq!( |
| 394 | offset.bytes_usize(), |
| 395 | alloc.inner().len(), |
| 396 | "create_const_alloc must consume all bytes of an Allocation" |
| 397 | ); |
| 398 | // println!("Done creating alloc of type {}", self.debug_type(ty)); |
| 399 | result |
| 400 | } |
| 401 | |
| 402 | fn create_const_alloc2( |
| 403 | &self, |
no test coverage detected