@@ -2839,10 +2839,9 @@ void DWARFASTParserClang::ParseSingleMember(
2839
2839
die.GetCU ()->Supports_unnamed_objc_bitfields ();
2840
2840
2841
2841
if (detect_unnamed_bitfields) {
2842
- llvm::Optional<FieldInfo> unnamed_field_info;
2843
- uint64_t last_field_end = 0 ;
2844
-
2845
- last_field_end = last_field_info.bit_offset + last_field_info.bit_size ;
2842
+ std::optional<FieldInfo> unnamed_field_info;
2843
+ uint64_t last_field_end =
2844
+ last_field_info.bit_offset + last_field_info.bit_size ;
2846
2845
2847
2846
if (!last_field_info.IsBitfield ()) {
2848
2847
// The last field was not a bit-field...
@@ -2862,10 +2861,8 @@ void DWARFASTParserClang::ParseSingleMember(
2862
2861
// indeed an unnamed bit-field. We currently do not have the
2863
2862
// machinary to track the offset of the last field of classes we
2864
2863
// have seen before, so we are not handling this case.
2865
- if (this_field_info.bit_offset != last_field_end &&
2866
- this_field_info.bit_offset > last_field_end &&
2867
- !(last_field_info.bit_offset == 0 &&
2868
- last_field_info.bit_size == 0 &&
2864
+ if (this_field_info.bit_offset > last_field_end &&
2865
+ !(last_field_info.bit_offset == 0 && last_field_info.bit_size == 0 &&
2869
2866
layout_info.base_offsets .size () != 0 )) {
2870
2867
unnamed_field_info = FieldInfo{};
2871
2868
unnamed_field_info->bit_size =
0 commit comments