mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-15 07:59:57 +00:00
Use consume instead of manually using drop_front
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271137 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
32f7ec64e7
commit
baa5e7155c
@ -998,10 +998,10 @@ void COFFDumper::mergeCodeViewTypes(MemoryTypeTableBuilder &CVTypes) {
|
||||
if (SectionName == ".debug$T") {
|
||||
StringRef Data;
|
||||
error(S.getContents(Data));
|
||||
unsigned Magic = *reinterpret_cast<const ulittle32_t *>(Data.data());
|
||||
uint32_t Magic;
|
||||
error(consume(Data, Magic));
|
||||
if (Magic != 4)
|
||||
error(object_error::parse_failed);
|
||||
Data = Data.drop_front(4);
|
||||
ArrayRef<uint8_t> Bytes(reinterpret_cast<const uint8_t *>(Data.data()),
|
||||
Data.size());
|
||||
ByteStream Stream(Bytes);
|
||||
|
Loading…
Reference in New Issue
Block a user