Correctly handle skewed streams in drop_front() method.
authorZachary Turner <zturner@google.com>
Thu, 13 Dec 2018 18:11:33 +0000 (18:11 +0000)
committerZachary Turner <zturner@google.com>
Thu, 13 Dec 2018 18:11:33 +0000 (18:11 +0000)
commita05ae9db01ac7d8f32f4ba52f74c1c447eb7acdd
tree864e7c3f4e4bd0703971462eec7e393ff5fd3ee7
parent046d100b4107ee6c9b8fe68e111dcf108cb18bdd
Correctly handle skewed streams in drop_front() method.

When calling BinaryStreamArray::drop_front(), if the stream
is skewed it means we must never drop the first bytes of the
stream since offsets which occur in records assume the existence
of those bytes.  So if we want to skip the first record in a
stream, then what we really want to do is just set the begin
pointer to the next record.  But we shouldn't actually remove
those bytes from the underlying view of the data.

llvm-svn: 349066
lld/COFF/PDB.cpp
llvm/include/llvm/Support/BinaryStreamArray.h