} else {
OutStreamer.AddComment("DW_OP_piece");
EmitInt8(dwarf::DW_OP_piece);
- OutStreamer.AddComment(Twine(Size));
- EmitULEB128(Size);
+ unsigned ByteSize = Size / 8; // Assuming 8 bits per byte.
+ OutStreamer.AddComment(Twine(ByteSize));
+ EmitULEB128(ByteSize);
}
}
}
addUInt(TheDie, dwarf::DW_FORM_data1, Size);
addUInt(TheDie, dwarf::DW_FORM_data1, Offset);
} else {
+ unsigned ByteSize = Size / 8; // Assuming 8 bits per byte.
addUInt(TheDie, dwarf::DW_FORM_data1, dwarf::DW_OP_piece);
- addUInt(TheDie, dwarf::DW_FORM_data1, Size);
+ addUInt(TheDie, dwarf::DW_FORM_data1, ByteSize);
}
}
}
; CHECK: .byte 80 # DW_OP_reg0
; CHECK: .byte 147 # DW_OP_piece
-; CHECK: .byte 16 # 16
+; CHECK: .byte 2 # 2
define i16 @f(i16 signext %zzz) nounwind {
entry:
; rdar://problem/16015314
;
; CHECK: DW_AT_name [DW_FORM_strp]{{.*}} "a"
-; CHECK: DW_AT_location [DW_FORM_block1] (<0x03> 54 93 20 )
+; CHECK: DW_AT_location [DW_FORM_block1] (<0x03> 54 93 04 )
;
; struct bar {
; int a;