Skip to content

Commit

Permalink
Merge pull request #65715 from apple/egorzhdan/cxx-disable-local-visi…
Browse files Browse the repository at this point in the history
…bility

[cxx-interop] Explicitly disable `-fmodules-local-submodule-visibility`
  • Loading branch information
egorzhdan authored May 14, 2023
2 parents 1db0947 + aed5614 commit 3865b5d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions lib/ClangImporter/ClangImporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1255,6 +1255,9 @@ ClangImporter::create(ASTContext &ctx,
// read them later.
instance.getLangOpts().NeededByPCHOrCompilationUsesPCH = true;

// Clang implicitly enables this by default in C++20 mode.
instance.getLangOpts().ModulesLocalVisibility = false;

if (importerOpts.Mode == ClangImporterOptions::Modes::PrecompiledModule)
return importer;

Expand Down
2 changes: 1 addition & 1 deletion test/Interop/Cxx/concepts/method-requires.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: %target-swiftxx-frontend -emit-ir -Xcc -std=gnu++20 -I %S/Inputs %s | %FileCheck %s
//
// REQUIRES: OS=macosx
// REQUIRES: OS=macosx || OS=linux-gnu

import MethodRequires

Expand Down
2 changes: 1 addition & 1 deletion test/Interop/Cxx/stdlib/use-std-vector.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %target-run-simple-swift(-I %S/Inputs -Xfrontend -enable-experimental-cxx-interop)
// FIXME: also test this in C++20 mode once rdar://108810356 is fixed.
// RUN: %target-run-simple-swift(-I %S/Inputs -Xfrontend -enable-experimental-cxx-interop -Xcc -std=gnu++20)
//
// REQUIRES: executable_test
//
Expand Down

0 comments on commit 3865b5d

Please sign in to comment.