[llvm] 80ec0eb - Revert "[OpaquePointers][BitcodeReader] Enable -opaque-pointers if we see an opaque pointer type"
Mitch Phillips via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 21 16:23:03 PDT 2022
Author: Mitch Phillips
Date: 2022-03-21T16:17:11-07:00
New Revision: 80ec0ebfdc5692a58e0832125f2c6a991df9d63f
URL: https://github.com/llvm/llvm-project/commit/80ec0ebfdc5692a58e0832125f2c6a991df9d63f
DIFF: https://github.com/llvm/llvm-project/commit/80ec0ebfdc5692a58e0832125f2c6a991df9d63f.diff
LOG: Revert "[OpaquePointers][BitcodeReader] Enable -opaque-pointers if we see an opaque pointer type"
This reverts commit 46216aa97729aa994dce79e75cd25707fb4b7874.
Dependency https://reviews.llvm.org/D119482 broke the ASan buildbot.
Added:
Modified:
llvm/lib/Bitcode/Reader/BitcodeReader.cpp
llvm/test/Other/force-opaque-ptrs.ll
Removed:
################################################################################
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index 034fa5832ba84..afe18c556cdaa 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -1883,9 +1883,7 @@ Error BitcodeReader::parseTypeTableBody() {
case bitc::TYPE_CODE_OPAQUE_POINTER: { // OPAQUE_POINTER: [addrspace]
if (Record.size() != 1)
return error("Invalid opaque pointer record");
- if (LLVM_UNLIKELY(!Context.hasSetOpaquePointersValue())) {
- Context.enableOpaquePointers();
- } else if (Context.supportsTypedPointers())
+ if (Context.supportsTypedPointers())
return error(
"Opaque pointers are only supported in -opaque-pointers mode");
unsigned AddressSpace = Record[0];
diff --git a/llvm/test/Other/force-opaque-ptrs.ll b/llvm/test/Other/force-opaque-ptrs.ll
index 4f33169b56da3..d963c7072e207 100644
--- a/llvm/test/Other/force-opaque-ptrs.ll
+++ b/llvm/test/Other/force-opaque-ptrs.ll
@@ -1,7 +1,6 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature
; RUN: llvm-as --opaque-pointers < %s | llvm-dis --opaque-pointers | FileCheck %s
; RUN: llvm-as < %s | llvm-dis --opaque-pointers | FileCheck %s
-; RUN: llvm-as --opaque-pointers < %s | llvm-dis | FileCheck %s
; RUN: opt --opaque-pointers < %s -S | FileCheck %s
; RUN: verify-uselistorder --opaque-pointers < %s
More information about the llvm-commits
mailing list