Index: clang/docs/ReleaseNotes.rst =================================================================== --- clang/docs/ReleaseNotes.rst +++ clang/docs/ReleaseNotes.rst @@ -254,6 +254,7 @@ - The CodeGen flag `-lower-global-dtors-via-cxa-atexit` which affects how global destructors are lowered for MachO is removed without replacement. The default of `-lower-global-dtors-via-cxa-atexit=true` is now the only supported way. +- The cc1 flag ``-no-opaque-pointers`` has been removed. Attribute Changes in Clang -------------------------- Index: clang/include/clang/Basic/CodeGenOptions.def =================================================================== --- clang/include/clang/Basic/CodeGenOptions.def +++ clang/include/clang/Basic/CodeGenOptions.def @@ -501,9 +501,6 @@ ENUM_CODEGENOPT(ZeroCallUsedRegs, llvm::ZeroCallUsedRegs::ZeroCallUsedRegsKind, 5, llvm::ZeroCallUsedRegs::ZeroCallUsedRegsKind::Skip) -/// Whether to use opaque pointers. -CODEGENOPT(OpaquePointers, 1, 0) - /// Modify C++ ABI to returning `this` pointer from constructors and /// non-deleting destructors. (No effect on Microsoft ABI.) CODEGENOPT(CtorDtorReturnThis, 1, 0) Index: clang/include/clang/Driver/Options.td =================================================================== --- clang/include/clang/Driver/Options.td +++ clang/include/clang/Driver/Options.td @@ -6029,13 +6029,6 @@ PosFlag, NegFlag, BothFlags<[], " analyzing function argument and return types for mandatory definedness">>; -defm opaque_pointers : BoolOption<"", - "opaque-pointers", - CodeGenOpts<"OpaquePointers">, - DefaultTrue, - PosFlag, - NegFlag, - BothFlags<[], " opaque pointers">>; def discard_value_names : Flag<["-"], "discard-value-names">, HelpText<"Discard value names in LLVM IR">, MarshallingInfoFlag>; Index: clang/lib/CodeGen/CodeGenAction.cpp =================================================================== --- clang/lib/CodeGen/CodeGenAction.cpp +++ clang/lib/CodeGen/CodeGenAction.cpp @@ -1047,8 +1047,6 @@ if (BA != Backend_EmitNothing && !OS) return nullptr; - VMContext->setOpaquePointers(CI.getCodeGenOpts().OpaquePointers); - // Load bitcode modules to link with, if we need to. if (LinkModules.empty()) for (const CodeGenOptions::BitcodeFileToLink &F : @@ -1106,8 +1104,6 @@ CompilerInstance &CI = getCompilerInstance(); SourceManager &SM = CI.getSourceManager(); - VMContext->setOpaquePointers(CI.getCodeGenOpts().OpaquePointers); - // For ThinLTO backend invocations, ensure that the context // merges types based on ODR identifiers. We also need to read // the correct module out of a multi-module bitcode file. Index: clang/test/CodeGen/arithmetic-fence-builtin.cpp =================================================================== --- clang/test/CodeGen/arithmetic-fence-builtin.cpp +++ clang/test/CodeGen/arithmetic-fence-builtin.cpp @@ -1,11 +1,11 @@ // RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm -mreassociate -o - %s \ -// RUN: -opaque-pointers | FileCheck --check-prefix CHECK %s +// RUN: | FileCheck --check-prefix CHECK %s // RUN: %clang_cc1 -triple i386-pc-linux-gnu -emit-llvm -mreassociate -o - %s \ -// RUN: -opaque-pointers | FileCheck --check-prefix CHECK %s +// RUN: | FileCheck --check-prefix CHECK %s // RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm -mreassociate \ -// RUN: -fprotect-parens -ffp-contract=on -o - %s -opaque-pointers \ +// RUN: -fprotect-parens -ffp-contract=on -o - %s \ // RUN: | FileCheck --check-prefix CHECK %s template T addAF(T a, T b) { Index: clang/test/CodeGenOpenCL/opaque-ptr-spirv.cl =================================================================== --- clang/test/CodeGenOpenCL/opaque-ptr-spirv.cl +++ /dev/null @@ -1,10 +0,0 @@ -// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -o - -triple spirv64 %s | FileCheck %s - -// Check that we have a way to recover pointer -// types for extern function prototypes (see PR56660). -extern void foo(global int * ptr); -kernel void k(global int * ptr) { - foo(ptr); -} -//CHECK: define spir_kernel void @k(i32 {{.*}}* -//CHECK: declare spir_func void @foo(i32 {{.*}}* Index: clang/test/CoverageMapping/ir.c =================================================================== --- clang/test/CoverageMapping/ir.c +++ clang/test/CoverageMapping/ir.c @@ -1,6 +1,5 @@ // Check the data structures emitted by coverage mapping // RUN: %clang_cc1 -mllvm -emptyline-comment-coverage=false -triple x86_64-apple-macosx10.9 -main-file-name ir.c %s -o - -emit-llvm -fprofile-instrument=clang -fcoverage-mapping -mllvm -enable-name-compression=false | FileCheck %s -check-prefixes=COMMON,DARWIN -// RUN: %clang_cc1 -mllvm -emptyline-comment-coverage=false -triple x86_64-apple-macosx10.9 -main-file-name ir.c %s -o - -emit-llvm -fprofile-instrument=clang -fcoverage-mapping -mllvm -enable-name-compression=false -opaque-pointers | FileCheck %s -check-prefixes=COMMON,DARWIN // RUN: %clang_cc1 -mllvm -emptyline-comment-coverage=false -triple x86_64--windows-msvc -main-file-name ir.c %s -o - -emit-llvm -fprofile-instrument=clang -fcoverage-mapping -mllvm -enable-name-compression=false | FileCheck %s -check-prefixes=COMMON,WINDOWS static inline void unused(void) {} Index: llvm/docs/OpaquePointers.rst =================================================================== --- llvm/docs/OpaquePointers.rst +++ llvm/docs/OpaquePointers.rst @@ -289,6 +289,8 @@ The following typed pointer functionality has already been removed: * The ``CLANG_ENABLE_OPAQUE_POINTERS`` cmake flag is no longer supported. +* The ``-no-opaque-pointers`` cc1 clang flag is no longer supported. +* The ``-plugin-opt=no-opaque-pointers`` LTO flag is no longer supported. * C APIs that do not support opaque pointers (like ``LLVMBuildLoad``) are no longer supported. * Typed pointer IR and bitcode is implicitly upgraded to use opaque pointers, @@ -296,6 +298,5 @@ The following typed pointer functionality is still to be removed: -* The ``-no-opaque-pointers`` cc1 flag, ``-opaque-pointers=0`` opt flag and - ``-plugin-opt=no-opaque-pointers`` lto flag. +* The ``-opaque-pointers=0`` opt flag. * Support for typed pointers in LLVM libraries.