[DWARF] Support for DW_FORM_strx3 and complete support for DW_FORM_strx{1,2,4}

(consumer).

Reviewer: aprantl

Differential Revision:  https://reviews.llvm.org/D34418

llvm-svn: 305944
This commit is contained in:
Wolfgang Pieb
2017-06-21 19:37:44 +00:00
parent fd048cc0ec
commit 258927e3da
6 changed files with 148 additions and 13 deletions

View File

@@ -68,6 +68,13 @@ uint16_t *DataExtractor::getU16(uint32_t *offset_ptr, uint16_t *dst,
Data.data());
}
uint32_t DataExtractor::getU24(uint32_t *offset_ptr) const {
uint24_t ExtractedVal =
getU<uint24_t>(offset_ptr, this, IsLittleEndian, Data.data());
// The 3 bytes are in the correct byte order for the host.
return ExtractedVal.getAsUint32(sys::IsLittleEndianHost);
}
uint32_t DataExtractor::getU32(uint32_t *offset_ptr) const {
return getU<uint32_t>(offset_ptr, this, IsLittleEndian, Data.data());
}