diff options
author | Nikita Popov <npopov@redhat.com> | 2022-04-04 16:58:42 +0200 |
---|---|---|
committer | Nikita Popov <npopov@redhat.com> | 2022-04-05 10:15:41 +0200 |
commit | d69e9f9d8978399a9d1f1c1ed62aa661440afcd3 (patch) | |
tree | 8b2d4df884cc58125e1212902c9a832bcadada4c /clang/lib/CodeGen/CodeGenAction.cpp | |
parent | cc6788aecec30b514489d6c214223a234f60f0b6 (diff) | |
download | llvm-d69e9f9d8978399a9d1f1c1ed62aa661440afcd3.zip llvm-d69e9f9d8978399a9d1f1c1ed62aa661440afcd3.tar.gz llvm-d69e9f9d8978399a9d1f1c1ed62aa661440afcd3.tar.bz2 |
[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
Diffstat (limited to 'clang/lib/CodeGen/CodeGenAction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenAction.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenAction.cpp b/clang/lib/CodeGen/CodeGenAction.cpp index 807880f..25f4cbb 100644 --- a/clang/lib/CodeGen/CodeGenAction.cpp +++ b/clang/lib/CodeGen/CodeGenAction.cpp @@ -983,6 +983,9 @@ CodeGenAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) { if (BA != Backend_EmitNothing && !OS) return nullptr; + if (CI.getCodeGenOpts().OpaquePointers) + VMContext->enableOpaquePointers(); + // Load bitcode modules to link with, if we need to. if (LinkModules.empty()) for (const CodeGenOptions::BitcodeFileToLink &F : |