summaryrefslogtreecommitdiffstats
path: root/lib/Lex
diff options
context:
space:
mode:
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>2017-05-09 00:41:38 +0000
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>2017-05-09 00:41:38 +0000
commita4e6a18c0f27fa88ab403ba530f45f4a780a6601 (patch)
tree37da833de1be1f781c2cb9ae96044d155873f234 /lib/Lex
parentf5831c59e6c82a953ce9ee75d466afd173c16de2 (diff)
[Modules] Allow umbrella frameworks to define private submodules for subframeworks
In r298391 we fixed the umbrella framework model to work when submodules named "Private" are used. This complements the work by allowing the umbrella framework model to work in general. rdar://problem/31790067 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@302491 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex')
-rw-r--r--lib/Lex/ModuleMap.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Lex/ModuleMap.cpp b/lib/Lex/ModuleMap.cpp
index 568894c32b..6f44dc757e 100644
--- a/lib/Lex/ModuleMap.cpp
+++ b/lib/Lex/ModuleMap.cpp
@@ -1913,8 +1913,10 @@ void ModuleMapParser::parseHeaderDecl(MMToken::TokenKind LeadingToken,
// '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);