compiler: Parse p- specs in datalayout string, allow definition of custom default data address space

This commit is contained in:
Edoardo Marangoni
2025-06-29 12:11:51 +02:00
committed by Edoardo Marangoni
parent 733b47ea4b
commit 93f1201c06
58 changed files with 416 additions and 170 deletions

View File

@@ -175,7 +175,7 @@ impl<'ll, 'tcx> ConstCodegenMethods for CodegenCx<'ll, 'tcx> {
}
fn const_usize(&self, i: u64) -> &'ll Value {
let bit_size = self.data_layout().pointer_size.bits();
let bit_size = self.data_layout().pointer_size().bits();
if bit_size < 64 {
// make sure it doesn't overflow
assert!(i < (1 << bit_size));