// 'framework module FrameworkName.Private', since a 'Private.Framework'
// does not usually exist. However, since both are currently widely used
// for private modules, make sure we find the right path in both cases.
- RelativePathName.resize(ActiveModule->IsFramework ? 0
- : RelativePathLength);
+ if (ActiveModule->IsFramework && ActiveModule->Name == "Private")
+ RelativePathName.clear();
+ else
+ RelativePathName.resize(RelativePathLength);
FullPathName.resize(FullPathLength);
llvm::sys::path::append(RelativePathName, "PrivateHeaders",
Header.FileName);
--- /dev/null
+framework module MainA_Private {
+ umbrella header "MainPriv.h"
+
+ module * { export * }
+ export *
+
+ explicit framework module Sub {
+ umbrella header "SubPriv.h"
+ module * { export * }
+ export *
+ }
+}
-// RUN: %clang_cc1 -fmodules -fsyntax-only -F%S/Inputs %s
+// RUN: rm -rf %t.cache
+// RUN: %clang_cc1 -fmodules -fsyntax-only -F%S/Inputs -fimplicit-module-maps \
+// RUN: -fmodules-cache-path=%t.cache -Wno-private-module -DBUILD_PUBLIC -verify %s
+// RUN: rm -rf %t.cache
+// RUN: %clang_cc1 -fmodules -fsyntax-only -F%S/Inputs -fimplicit-module-maps \
+// RUN: -fmodules-cache-path=%t.cache -Wno-private-module -verify %s
+//expected-no-diagnostics
+
+#ifdef BUILD_PUBLIC
#import "Main/Main.h"
+#else
+#import "MainA/MainPriv.h"
+#endif