diff options
author | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2017-05-09 00:41:38 +0000 |
---|---|---|
committer | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2017-05-09 00:41:38 +0000 |
commit | d6e3289cb210764700f3f9dd33afceb99bb68f1e (patch) | |
tree | 5ef1e1c741ecfd5aecb43c39ce276d41eb373ca3 /clang/lib/Lex/ModuleMap.cpp | |
parent | 94cb34b6a1efc04ae7201d3bd7b025c781da1926 (diff) | |
download | llvm-d6e3289cb210764700f3f9dd33afceb99bb68f1e.zip llvm-d6e3289cb210764700f3f9dd33afceb99bb68f1e.tar.gz llvm-d6e3289cb210764700f3f9dd33afceb99bb68f1e.tar.bz2 |
[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.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Lex/ModuleMap.cpp b/clang/lib/Lex/ModuleMap.cpp index 568894c..6f44dc7 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); |