[PATCH] D117067: [Bitcode] Call takeError if MaybeVBR doesn't have a value, and update bitcode doc on module block
Teresa Johnson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 14 15:35:59 PST 2022
tejohnson added a comment.
lgtm on the documentation change but that should be submitted separately as it is unrelated to the code fix.
The other change lgtm but if it is feasible to add a test that would be ideal.
================
Comment at: llvm/docs/BitCodeFormat.rst:560
The ``MODULE_BLOCK`` block (id 8) is the top-level block for LLVM bitcode files,
-and each bitcode file must contain exactly one. In addition to records
(described below) containing information about the module, a ``MODULE_BLOCK``
----------------
Can you fix the line length? The file seems to stick with 80 col.
================
Comment at: llvm/lib/Bitstream/Reader/BitstreamReader.cpp:100
if (!MaybeVBR)
- return MaybeVBR.get();
+ return MaybeVBR.takeError();
unsigned NumElts = MaybeVBR.get();
----------------
Is it feasible to add a test? What was the behavior without the fix?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117067/new/
https://reviews.llvm.org/D117067
More information about the llvm-commits
mailing list