[debuginfo] Don't mark fields and types as artificial in CPP-like enum debuginfo encoding.
LLDB historically has had problems with "artificial" entries and there is no real benefit to emitting that flag.
This commit is contained in:
parent
8433e2a66f
commit
171d8a3f57
1 changed files with 5 additions and 5 deletions
|
@ -119,7 +119,7 @@ const SINGLE_VARIANT_VIRTUAL_DISR: u64 = 0;
|
||||||
///
|
///
|
||||||
/// The following pseudocode shows how to decode an enum value in a debugger:
|
/// The following pseudocode shows how to decode an enum value in a debugger:
|
||||||
///
|
///
|
||||||
/// ```ignore
|
/// ```text
|
||||||
///
|
///
|
||||||
/// fn find_active_variant(enum_value) -> (VariantName, VariantValue) {
|
/// fn find_active_variant(enum_value) -> (VariantName, VariantValue) {
|
||||||
/// let is_128_bit = enum_value.has_field("tag128_lo");
|
/// let is_128_bit = enum_value.has_field("tag128_lo");
|
||||||
|
@ -365,7 +365,7 @@ fn build_single_variant_union_fields<'ll, 'tcx>(
|
||||||
unknown_file_metadata(cx),
|
unknown_file_metadata(cx),
|
||||||
UNKNOWN_LINE_NUMBER,
|
UNKNOWN_LINE_NUMBER,
|
||||||
variant_names_type_di_node,
|
variant_names_type_di_node,
|
||||||
DIFlags::FlagArtificial,
|
DIFlags::FlagZero,
|
||||||
Some(cx.const_u64(SINGLE_VARIANT_VIRTUAL_DISR)),
|
Some(cx.const_u64(SINGLE_VARIANT_VIRTUAL_DISR)),
|
||||||
tag_base_type_align.bits() as u32,
|
tag_base_type_align.bits() as u32,
|
||||||
)
|
)
|
||||||
|
@ -482,7 +482,7 @@ fn build_variant_struct_wrapper_type_di_node<'ll, 'tcx>(
|
||||||
// NOTE: We use size and align of enum_type, not from variant_layout:
|
// NOTE: We use size and align of enum_type, not from variant_layout:
|
||||||
size_and_align_of(enum_or_generator_type_and_layout),
|
size_and_align_of(enum_or_generator_type_and_layout),
|
||||||
Some(enum_or_generator_type_di_node),
|
Some(enum_or_generator_type_di_node),
|
||||||
DIFlags::FlagArtificial,
|
DIFlags::FlagZero,
|
||||||
),
|
),
|
||||||
|cx, wrapper_struct_type_di_node| {
|
|cx, wrapper_struct_type_di_node| {
|
||||||
enum DiscrKind {
|
enum DiscrKind {
|
||||||
|
@ -526,7 +526,7 @@ fn build_variant_struct_wrapper_type_di_node<'ll, 'tcx>(
|
||||||
"value",
|
"value",
|
||||||
size_and_align_of(enum_or_generator_type_and_layout),
|
size_and_align_of(enum_or_generator_type_and_layout),
|
||||||
Size::ZERO,
|
Size::ZERO,
|
||||||
DIFlags::FlagArtificial,
|
DIFlags::FlagZero,
|
||||||
variant_struct_type_di_node,
|
variant_struct_type_di_node,
|
||||||
));
|
));
|
||||||
|
|
||||||
|
@ -540,7 +540,7 @@ fn build_variant_struct_wrapper_type_di_node<'ll, 'tcx>(
|
||||||
unknown_file_metadata(cx),
|
unknown_file_metadata(cx),
|
||||||
UNKNOWN_LINE_NUMBER,
|
UNKNOWN_LINE_NUMBER,
|
||||||
type_di_node,
|
type_di_node,
|
||||||
DIFlags::FlagArtificial,
|
DIFlags::FlagZero,
|
||||||
Some(cx.const_u64(value)),
|
Some(cx.const_u64(value)),
|
||||||
align.bits() as u32,
|
align.bits() as u32,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue