(&self, val: Self::Value, ty: Self::Type)
| 356 | } |
| 357 | |
| 358 | fn const_ptrcast(&self, val: Self::Value, ty: Self::Type) -> Self::Value { |
| 359 | if val.ty == ty { |
| 360 | val |
| 361 | } else { |
| 362 | // constant ptrcast is not supported in spir-v |
| 363 | let result = val.def_cx(self).with_type(ty); |
| 364 | self.zombie_no_span(result.def_cx(self), "const_ptrcast"); |
| 365 | result |
| 366 | } |
| 367 | } |
| 368 | } |
| 369 | |
| 370 | impl<'tcx> CodegenCx<'tcx> { |
nothing calls this directly
no test coverage detected