summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>2018-04-16 19:42:32 +0000
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>2018-04-16 19:42:32 +0000
commita3b5f71eaa924f71321fb989d727a3a6365ba557 (patch)
tree3092cd77bd37e5c18b815ad93bdaa2a18908b086 /clang/lib/Frontend/CompilerInstance.cpp
parent1c3bd2ff0c71590ad02c68bf0d4bbd3bbc27837e (diff)
downloadbcm5719-llvm-a3b5f71eaa924f71321fb989d727a3a6365ba557.tar.gz
bcm5719-llvm-a3b5f71eaa924f71321fb989d727a3a6365ba557.zip
Use export_as for autolinking frameworks
framework module SomeKitCore { ... export_as SomeKit } Given the module above, while generting autolink information during codegen, clang should to emit '-framework SomeKitCore' only if SomeKit was not imported in the relevant TU, otherwise it should use '-framework SomeKit' instead. rdar://problem/38269782 llvm-svn: 330152
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInstance.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index b8f55b61427..f57246bec09 100644
--- a/clang/lib/Frontend/CompilerInstance.cpp
+++ b/clang/lib/Frontend/CompilerInstance.cpp
@@ -1979,6 +1979,12 @@ CompilerInstance::loadModule(SourceLocation ImportLoc,
Module, ImportLoc);
}
+ // Resolve any remaining module using export_as for this one.
+ getPreprocessor()
+ .getHeaderSearchInfo()
+ .getModuleMap()
+ .resolveLinkAsDependencies(TopModule);
+
LastModuleImportLoc = ImportLoc;
LastModuleImportResult = ModuleLoadResult(Module);
return LastModuleImportResult;
OpenPOWER on IntegriCloud