summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/ModuleMap.cpp
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
commitd6e3289cb210764700f3f9dd33afceb99bb68f1e (patch)
tree5ef1e1c741ecfd5aecb43c39ce276d41eb373ca3 /clang/lib/Lex/ModuleMap.cpp
parent94cb34b6a1efc04ae7201d3bd7b025c781da1926 (diff)
downloadbcm5719-llvm-d6e3289cb210764700f3f9dd33afceb99bb68f1e.tar.gz
bcm5719-llvm-d6e3289cb210764700f3f9dd33afceb99bb68f1e.zip
[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 llvm-svn: 302491
Diffstat (limited to 'clang/lib/Lex/ModuleMap.cpp')
-rw-r--r--clang/lib/Lex/ModuleMap.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Lex/ModuleMap.cpp b/clang/lib/Lex/ModuleMap.cpp
index 568894c32b9..6f44dc757e8 100644
--- a/clang/lib/Lex/ModuleMap.cpp
+++ b/clang/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);
OpenPOWER on IntegriCloud