[PATCH] D117067: Call takeError if MaybeVBR doesn't have a value.
Mingming Liu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 11 16:58:04 PST 2022
luna created this revision.
luna added a reviewer: jfb.
Herald added a subscriber: hiraditya.
luna published this revision for review.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D117067
Files:
llvm/lib/Bitstream/Reader/BitstreamReader.cpp
Index: llvm/lib/Bitstream/Reader/BitstreamReader.cpp
===================================================================
--- llvm/lib/Bitstream/Reader/BitstreamReader.cpp
+++ llvm/lib/Bitstream/Reader/BitstreamReader.cpp
@@ -97,7 +97,7 @@
unsigned Code = MaybeCode.get();
Expected<uint32_t> MaybeVBR = ReadVBR(6);
if (!MaybeVBR)
- return MaybeVBR.get();
+ return MaybeVBR.takeError();
unsigned NumElts = MaybeVBR.get();
for (unsigned i = 0; i != NumElts; ++i)
if (Expected<uint64_t> Res = ReadVBR64(6))
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117067.399128.patch
Type: text/x-patch
Size: 545 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220112/de4e428b/attachment.bin>
More information about the llvm-commits
mailing list