[OpaquePtrs][Clang] Add -opaque-pointers/-no-opaque-pointers cc1 options
authorNikita Popov <npopov@redhat.com>
Mon, 4 Apr 2022 14:58:42 +0000 (16:58 +0200)
committerNikita Popov <npopov@redhat.com>
Tue, 5 Apr 2022 08:15:41 +0000 (10:15 +0200)
commitd69e9f9d8978399a9d1f1c1ed62aa661440afcd3
tree8b2d4df884cc58125e1212902c9a832bcadada4c
parentcc6788aecec30b514489d6c214223a234f60f0b6
[OpaquePtrs][Clang] Add -opaque-pointers/-no-opaque-pointers cc1 options

This adds cc1 options for enabling and disabling opaque pointers
on the clang side. This is not super useful now (because
-mllvm -opaque-pointers and -Xclang -opaque-pointers have the same
visible effect) but will be important once opaque pointers are
enabled by default in clang. In that case, it will only be
possible to disable them using the cc1 -no-opaque-pointers option.

Differential Revision: https://reviews.llvm.org/D123034
clang/include/clang/Basic/CodeGenOptions.def
clang/include/clang/Driver/Options.td
clang/lib/CodeGen/CodeGenAction.cpp
clang/test/CodeGen/opaque-pointers-flag.c [new file with mode: 0644]