[PATCH] D107796: [docs] Clarify variable-width integer (VBR) encoding example.
Volodymyr Sapsai via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 9 18:55:28 PDT 2021
vsapsai added a comment.
Tested the actual numbers with
TEST(BitstreamWriterTest, emitDocSample) {
SmallVector<char> Buffer;
BitstreamWriter W(Buffer);
W.EmitVBR(30, 4);
W.FlushToWord();
EXPECT_EQ((SmallVector<char>{0b0011'1110, 0, 0, 0}), Buffer);
}
in BitstreamWriterTest.cpp. Don't think it is worth keeping as we don't enforce the docs to be in sync with the unit tests.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107796/new/
https://reviews.llvm.org/D107796
More information about the llvm-commits
mailing list