diff options
| author | Ralf Jung <post@ralfj.de> | 2024-08-31 11:29:02 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2024-08-31 11:29:02 +0200 |
| commit | d0aedfbb900309bb633b3ba04bf008183cfdd9a7 (patch) | |
| tree | bd27610dc20d985b99393191d4a0369390b625e8 /compiler/rustc_codegen_llvm | |
| parent | fa72f0763de6bc1596208fc1419883ce5aea0de4 (diff) | |
| download | rust-d0aedfbb900309bb633b3ba04bf008183cfdd9a7.tar.gz rust-d0aedfbb900309bb633b3ba04bf008183cfdd9a7.zip | |
interpret, codegen: tweak some comments and checks regarding Box with custom allocator
Diffstat (limited to 'compiler/rustc_codegen_llvm')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs b/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs index dc59e9349b0..17a9630c655 100644 --- a/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs +++ b/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs @@ -216,6 +216,8 @@ fn build_pointer_or_reference_di_node<'ll, 'tcx>( // need to make sure that we don't break existing debuginfo consumers // by doing that (at least not without a warning period). let layout_type = if ptr_type.is_box() { + // The assertion at the start of this function ensures we have a ZST allocator. + // We'll make debuginfo "skip" all ZST allocators, not just the default allocator. Ty::new_mut_ptr(cx.tcx, pointee_type) } else { ptr_type |
