[PATCH] D60810: [Support] Add LEB128 support to BinaryStreamReader/Writer.
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 17 08:12:08 PDT 2019
dblaikie accepted this revision.
dblaikie added a comment.
This revision is now accepted and ready to land.
Looks reasonable to me
================
Comment at: lib/Support/BinaryStreamReader.cpp:64-68
+ do {
+ if (auto Err = readBytes(NextByte, 1))
+ return Err;
+ EncodedBytes.push_back(NextByte[0]);
+ } while (NextByte[0] & 0x80);
----------------
Wonder if it's worth rewriting decodeULEB128 as a template (so it can read from different sources without having to buffer it all into an array (& in doing that buffering, having to reimplement the 0x80 check piece))?
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60810/new/
https://reviews.llvm.org/D60810
More information about the llvm-commits
mailing list