[LLVMContext] Replace enableOpaquePointers() with setOpaquePointers()
This allows both explicitly enabling and explicitly disabling opaque pointers, in anticipation of the default switching at some point. This also slightly changes the rules by allowing calls if either the opaque pointer mode has not yet been set (explicitly or implicitly) or if the value remains unchanged.
This commit is contained in:
1 parent
302fe7b3c4
commit
46cfbe561b
8 files changed
+18
-15
No files matched your search
@@ -1884,7 +1884,7 @@ Error BitcodeReader::parseTypeTableBody() {
|
||||
if (Record.size() != 1)
|
||||
return error("Invalid opaque pointer record");
|
||||
if (LLVM_UNLIKELY(!Context.hasSetOpaquePointersValue())) {
|
||||
Context.enableOpaquePointers();
|
||||
Context.setOpaquePointers(true);
|
||||
} else if (Context.supportsTypedPointers())
|
||||
return error(
|
||||
"Opaque pointers are only supported in -opaque-pointers mode");
|
||||
|
||||
Reference in new issue
Block a user