[PATCH] D125736: [OpaquePtr][BitcodeReader] Explicitly turn off opaque pointers if we see a typed pointer
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 16 17:51:26 PDT 2022
aeubanks created this revision.
Herald added a subscriber: hiraditya.
Herald added a project: All.
aeubanks requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Followup to D125735 <https://reviews.llvm.org/D125735> on the bitcode reader side.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D125736
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
@@ -1890,6 +1890,8 @@
if (!ResultTy ||
!PointerType::isValidElementType(ResultTy))
return error("Invalid type");
+ if (LLVM_UNLIKELY(!Context.hasSetOpaquePointersValue()))
+ Context.setOpaquePointers(false);
ContainedIDs.push_back(Record[0]);
ResultTy = PointerType::get(ResultTy, AddressSpace);
break;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125736.429911.patch
Type: text/x-patch
Size: 572 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220517/1f11d573/attachment.bin>
More information about the llvm-commits
mailing list