Skip to content

Commit 3865b5d

Browse files
authored
Merge pull request #65715 from apple/egorzhdan/cxx-disable-local-visibility
[cxx-interop] Explicitly disable `-fmodules-local-submodule-visibility`
2 parents 1db0947 + aed5614 commit 3865b5d

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

lib/ClangImporter/ClangImporter.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -1255,6 +1255,9 @@ ClangImporter::create(ASTContext &ctx,
12551255
// read them later.
12561256
instance.getLangOpts().NeededByPCHOrCompilationUsesPCH = true;
12571257

1258+
// Clang implicitly enables this by default in C++20 mode.
1259+
instance.getLangOpts().ModulesLocalVisibility = false;
1260+
12581261
if (importerOpts.Mode == ClangImporterOptions::Modes::PrecompiledModule)
12591262
return importer;
12601263

test/Interop/Cxx/concepts/method-requires.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %target-swiftxx-frontend -emit-ir -Xcc -std=gnu++20 -I %S/Inputs %s | %FileCheck %s
22
//
3-
// REQUIRES: OS=macosx
3+
// REQUIRES: OS=macosx || OS=linux-gnu
44

55
import MethodRequires
66

test/Interop/Cxx/stdlib/use-std-vector.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %target-run-simple-swift(-I %S/Inputs -Xfrontend -enable-experimental-cxx-interop)
2-
// FIXME: also test this in C++20 mode once rdar://108810356 is fixed.
2+
// RUN: %target-run-simple-swift(-I %S/Inputs -Xfrontend -enable-experimental-cxx-interop -Xcc -std=gnu++20)
33
//
44
// REQUIRES: executable_test
55
//

0 commit comments

Comments
 (0)