diff options
| author | Nikita Popov <npopov@redhat.com> | 2022-04-05 11:36:06 +0200 |
|---|---|---|
| committer | Nikita Popov <npopov@redhat.com> | 2022-04-05 12:02:48 +0200 |
| commit | 46cfbe561bfd3b35984b3e1662bd2bca4eb9e96d (patch) | |
| tree | 7e73a3ad30e864df351ea20cd2d108c79fe4797c /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
| parent | 302fe7b3c40f7b949f3bebb74997bef9bf74d59f (diff) | |
[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.
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
| -rw-r--r-- | llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index 034fa5832ba8..8a5074941b97 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -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"); |
