Skip to content

Commit 066fb7a

Browse files
committed
[Clang] Remove -no-opaque-pointers cc1 flag
Migration of clang tests to opaque pointers is finished, so remove the -no-opaque-pointers flag. Differential Revision: https://reviews.llvm.org/D152447
1 parent e4c1fa7 commit 066fb7a

File tree

7 files changed

+4
-51
lines changed

7 files changed

+4
-51
lines changed

clang/docs/ReleaseNotes.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ Removed Compiler Flags
254254
- The CodeGen flag `-lower-global-dtors-via-cxa-atexit` which affects how global
255255
destructors are lowered for MachO is removed without replacement. The default
256256
of `-lower-global-dtors-via-cxa-atexit=true` is now the only supported way.
257+
- The cc1 flag ``-no-opaque-pointers`` has been removed.
257258

258259
Attribute Changes in Clang
259260
--------------------------

clang/include/clang/Basic/CodeGenOptions.def

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -501,9 +501,6 @@ CODEGENOPT(SkipRaxSetup, 1, 0)
501501
ENUM_CODEGENOPT(ZeroCallUsedRegs, llvm::ZeroCallUsedRegs::ZeroCallUsedRegsKind,
502502
5, llvm::ZeroCallUsedRegs::ZeroCallUsedRegsKind::Skip)
503503

504-
/// Whether to use opaque pointers.
505-
CODEGENOPT(OpaquePointers, 1, 0)
506-
507504
/// Modify C++ ABI to returning `this` pointer from constructors and
508505
/// non-deleting destructors. (No effect on Microsoft ABI.)
509506
CODEGENOPT(CtorDtorReturnThis, 1, 0)

clang/include/clang/Driver/Options.td

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6029,13 +6029,6 @@ defm enable_noundef_analysis : BoolOption<"",
60296029
PosFlag<SetTrue, [], "Enable">,
60306030
NegFlag<SetFalse, [], "Disable">,
60316031
BothFlags<[], " analyzing function argument and return types for mandatory definedness">>;
6032-
defm opaque_pointers : BoolOption<"",
6033-
"opaque-pointers",
6034-
CodeGenOpts<"OpaquePointers">,
6035-
DefaultTrue,
6036-
PosFlag<SetTrue, [], "Enable">,
6037-
NegFlag<SetFalse, [], "Disable">,
6038-
BothFlags<[], " opaque pointers">>;
60396032
def discard_value_names : Flag<["-"], "discard-value-names">,
60406033
HelpText<"Discard value names in LLVM IR">,
60416034
MarshallingInfoFlag<CodeGenOpts<"DiscardValueNames">>;

clang/lib/CodeGen/CodeGenAction.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,8 +1047,6 @@ CodeGenAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) {
10471047
if (BA != Backend_EmitNothing && !OS)
10481048
return nullptr;
10491049

1050-
VMContext->setOpaquePointers(CI.getCodeGenOpts().OpaquePointers);
1051-
10521050
// Load bitcode modules to link with, if we need to.
10531051
if (LinkModules.empty())
10541052
for (const CodeGenOptions::BitcodeFileToLink &F :
@@ -1106,8 +1104,6 @@ CodeGenAction::loadModule(MemoryBufferRef MBRef) {
11061104
CompilerInstance &CI = getCompilerInstance();
11071105
SourceManager &SM = CI.getSourceManager();
11081106

1109-
VMContext->setOpaquePointers(CI.getCodeGenOpts().OpaquePointers);
1110-
11111107
// For ThinLTO backend invocations, ensure that the context
11121108
// merges types based on ODR identifiers. We also need to read
11131109
// the correct module out of a multi-module bitcode file.

clang/test/CodeGen/opaque-pointers-flag.c

Lines changed: 0 additions & 25 deletions
This file was deleted.

clang/test/CodeGenOpenCL/opaque-ptr-spirv.cl

Lines changed: 0 additions & 10 deletions
This file was deleted.

llvm/docs/OpaquePointers.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,13 +289,14 @@ avoid breaking remaining tests.
289289
The following typed pointer functionality has already been removed:
290290

291291
* The ``CLANG_ENABLE_OPAQUE_POINTERS`` cmake flag is no longer supported.
292+
* The ``-no-opaque-pointers`` cc1 clang flag is no longer supported.
293+
* The ``-plugin-opt=no-opaque-pointers`` LTO flag is no longer supported.
292294
* C APIs that do not support opaque pointers (like ``LLVMBuildLoad``) are no
293295
longer supported.
294296
* Typed pointer IR and bitcode is implicitly upgraded to use opaque pointers,
295297
unless ``-opaque-pointers=0`` is passed.
296298

297299
The following typed pointer functionality is still to be removed:
298300

299-
* The ``-no-opaque-pointers`` cc1 flag, ``-opaque-pointers=0`` opt flag and
300-
``-plugin-opt=no-opaque-pointers`` lto flag.
301+
* The ``-opaque-pointers=0`` opt flag.
301302
* Support for typed pointers in LLVM libraries.

0 commit comments

Comments
 (0)