Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
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.
llvm/docs/BitCodeFormat.rst | ||
---|---|---|
560 | Can you fix the line length? The file seems to stick with 80 col. | |
llvm/lib/Bitstream/Reader/BitstreamReader.cpp | ||
100 ↗ | (On Diff #399709) | Is it feasible to add a test? What was the behavior without the fix? |
Keep the documentation change and put bitcode reader change to https://reviews.llvm.org/D117630 (which is still a draft).
thanks! I revise this patch to be doc-only, and reformat, and going to pursue bitcode reader change in https://reviews.llvm.org/D117630
The patch is still a draft and I'll see how to add a test (probably an invalid bitcode is needed to trigger the condition);
What's the behavior without the fix
I think upon hitting the branch, trying to call get will run into assertions (with the asserted condition being false); yet it happens very rarely (if at all) since most of time, bitcode file should be valid.
I'll see if there is a lightweight way to construct the bitcode to have a test (maybe by hacking bitcode writer to generate an invalid record).
Can you fix the line length? The file seems to stick with 80 col.