Skip to content

Commit 73ad9fa

Browse files
committed
move constant to better align with pr#134597
1 parent 8df3b6b commit 73ad9fa

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ const DW_ATE_unsigned: c_uint = 0x07;
7474
#[allow(non_upper_case_globals)]
7575
const DW_ATE_UTF: c_uint = 0x10;
7676

77+
#[allow(non_upper_case_globals)]
78+
const DW_TAG_const_type: c_uint = 0x26;
79+
7780
pub(super) const UNKNOWN_LINE_NUMBER: c_uint = 0;
7881
pub(super) const UNKNOWN_COLUMN_NUMBER: c_uint = 0;
7982

compiler/rustc_codegen_llvm/src/debuginfo/metadata/enums/cpp_like.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ use crate::common::{AsCCharPtr, CodegenCx};
1515
use crate::debuginfo::metadata::enums::DiscrResult;
1616
use crate::debuginfo::metadata::type_map::{self, Stub, UniqueTypeId};
1717
use crate::debuginfo::metadata::{
18-
DINodeCreationResult, NO_GENERICS, NO_SCOPE_METADATA, SmallVec, UNKNOWN_LINE_NUMBER,
19-
build_field_di_node, file_metadata, size_and_align_of, type_di_node, unknown_file_metadata,
20-
visibility_di_flags,
18+
DINodeCreationResult, DW_TAG_const_type, NO_GENERICS, NO_SCOPE_METADATA, SmallVec,
19+
UNKNOWN_LINE_NUMBER, build_field_di_node, file_metadata, size_and_align_of, type_di_node,
20+
unknown_file_metadata, visibility_di_flags,
2121
};
2222
use crate::debuginfo::utils::DIB;
2323
use crate::llvm::debuginfo::{DIFile, DIFlags, DIType};
@@ -546,11 +546,10 @@ fn build_variant_struct_wrapper_type_di_node<'ll, 'tcx>(
546546
let ty_u64 = Ty::new_uint(cx.tcx, ty::UintTy::U64);
547547
(type_di_node(cx, ty_u64), Align::EIGHT.bits() as u32)
548548
};
549-
const DW_TAG_CONST_TYPE: c_uint = 0x0026;
550549

551550
// must wrap type in a `const` modifier for LLDB to be able to inspect the value of the member
552551
let field_type =
553-
llvm::LLVMRustDIBuilderCreateQualifiedType(DIB(cx), DW_TAG_CONST_TYPE, t_di);
552+
llvm::LLVMRustDIBuilderCreateQualifiedType(DIB(cx), DW_TAG_const_type, t_di);
554553

555554
llvm::LLVMRustDIBuilderCreateStaticMemberType(
556555
DIB(cx),

0 commit comments

Comments
 (0)