http://www.dwarfstd.org/doc/DWARF4.pdf
DWARF blocks come in four forms:
- DW_FORM_block1 : A 1-byte length followed by 0 to 255 contiguous information bytes
- DW_FORM_block2 : A 2-byte length followed by 0 to 65,535 contiguous information bytes
- DW_FORM_block4 : A 4-byte length followed by 0 to 4,294,967,295 contiguous information bytes
- DW_FORM_block : An unsigned LEB128 length followed by the number of bytes specified by the length
In LLVM, the form is selected by function DIEBlock::BestForm(). The size of the block need to be
recomputed before determing the BestForm, and the function DwarfUnit::addBlock(DIE&,Attribute,DIEBlock*)
forgot to do that.
I +1 first.
This addBlock is simplify for line 401, and the Block->BestForm decided by Size, I agree with this change.