[OpaquePtr][BitcodeReader] Explicitly turn off opaque pointers if we see a typed pointer
Followup to D125735 on the bitcode reader side. Reviewed By: #opaque-pointers, nikic Differential Revision: https://reviews.llvm.org/D125736
This commit is contained in:
@@ -1890,6 +1890,8 @@ Error BitcodeReader::parseTypeTableBody() {
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user