[PATCH] D63518: BitStream reader: propagate errors
Francis Visoiu Mistrih via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 25 14:21:29 PDT 2019
thegameg added inline comments.
================
Comment at: llvm/include/llvm/Bitcode/BitstreamReader.h:441
// If we found a sub-block, just skip over it and check the next entry.
- if (SkipBlock())
- return BitstreamEntry::getError();
+ if (llvm::Error Err = SkipBlock())
+ return std::move(Err);
----------------
`llvm::` seems unnecessary here.
================
Comment at: llvm/include/llvm/Bitcode/BitstreamReader.h:489
bool ReadBlockEnd() {
if (BlockScope.empty()) return true;
----------------
Any reason why this doesn't return `Error`?
================
Comment at: llvm/lib/Bitcode/Reader/BitstreamReader.cpp:140
CodeOp.getEncoding() == BitCodeAbbrevOp::Blob)
report_fatal_error("Abbreviation starts with an Array or a Blob");
+ Expected<uint64_t> MaybeCode = readAbbreviatedField(*this, CodeOp);
----------------
`return createStringError` here too?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63518/new/
https://reviews.llvm.org/D63518
More information about the cfe-commits
mailing list