File tree Expand file tree Collapse file tree 5 files changed +28
-19
lines changed
Inputs/AutolinkTBD.framework Expand file tree Collapse file tree 5 files changed +28
-19
lines changed Original file line number Diff line number Diff line change @@ -984,7 +984,9 @@ static void inferFrameworkLink(Module *Mod) {
984
984
assert (!Mod->isSubFramework () &&
985
985
" Can only infer linking for top-level frameworks" );
986
986
987
- Mod->LinkLibraries .push_back (Module::LinkLibrary (Mod->Name ,
987
+ StringRef FrameworkName (Mod->Name );
988
+ FrameworkName.consume_back (" _Private" );
989
+ Mod->LinkLibraries .push_back (Module::LinkLibrary (FrameworkName.str (),
988
990
/* IsFramework=*/ true ));
989
991
}
990
992
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ // Test that autolink hints for frameworks don't use the private module name.
2
+ // RUN: rm -rf %t && mkdir %t
3
+ // RUN: split-file %s %t
4
+
5
+ // RUN: %clang_cc1 -emit-llvm -o - -fmodules-cache-path=%t/ModuleCache -fmodules -fimplicit-module-maps -F %t/Frameworks %t/test.m | FileCheck %s
6
+
7
+ // CHECK: !{!"-framework", !"Autolink"}
8
+ // CHECK-NOT: !{!"-framework", !"Autolink_Private"}
9
+
10
+ // --- test.m
11
+ #include < Autolink/Autolink.h>
12
+ #include < Autolink/Autolink_Private.h>
13
+
14
+ // --- Frameworks/Autolink.framework/Headers/Autolink.h
15
+ void public ();
16
+
17
+ // --- Frameworks/Autolink.framework/PrivateHeaders/Autolink_Private.h
18
+ void private ();
19
+
20
+ // --- Frameworks/Autolink.framework/Modules/module.modulemap
21
+ framework module Autolink { header " Autolink.h" }
22
+
23
+ // --- Frameworks/Autolink.framework/Modules/module.private.modulemap
24
+ framework module Autolink_Private { header " Autolink_Private.h" }
25
+
You can’t perform that action at this time.
0 commit comments