[PATCH] D109655: [BitcodeReader] fix a logic error in vector type element validation
Shivam Gupta via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 8 21:12:07 PDT 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG778bf73d7ba6: [BitcodeReader] fix a logic error in vector type element validation (authored by woodruffw, committed by xgupta).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109655/new/
https://reviews.llvm.org/D109655
Files:
llvm/lib/Bitcode/Reader/BitcodeReader.cpp
Index: llvm/lib/Bitcode/Reader/BitcodeReader.cpp
===================================================================
--- llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -1926,7 +1926,7 @@
if (Record[0] == 0)
return error("Invalid vector length");
ResultTy = getTypeByID(Record[1]);
- if (!ResultTy || !StructType::isValidElementType(ResultTy))
+ if (!ResultTy || !VectorType::isValidElementType(ResultTy))
return error("Invalid type");
bool Scalable = Record.size() > 2 ? Record[2] : false;
ResultTy = VectorType::get(ResultTy, Record[0], Scalable);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109655.378410.patch
Type: text/x-patch
Size: 649 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211009/45fce2d3/attachment.bin>
More information about the llvm-commits
mailing list