[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:
@@ -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