thegameg added inline comments.
================
Comment at: llvm/include/llvm/Bitcode/BitstreamReader.h:489
bool ReadBlockEnd() {
if (BlockScope.empty()) return true;
----------------
jfb wrote:
> thegameg wrote:
> > Any reason why this doesn't return `Error`?
> I'm not sure it's really an error: it goes to the end of the block either
> because it's empty, or because it pops the scope (which doesn't error
> either). It might be erroneously used, but I'm not sure we should make it an
> error right now. WDYT?
Yeah, I'm not sure either... `BitstreamCursor::advance` seems to return
`BitstreamEntry::getError();` if this function fails after it encountered an
`END_BLOCK`, and the other users seem to return things like
`SDError::InvalidDiagnostics` or `Cursor::BadBlock`.
I guess for now, it's fine as it is.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63518/new/
https://reviews.llvm.org/D63518
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits