From 97eec24b0bc245fc96ac9615899c3d15a6bc8b3e Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Thu, 15 Sep 2011 22:00:41 +0000 Subject: Add an experimental flag -fauto-module-import that automatically turns #include or #import direcctives of framework headers into module imports of the corresponding framework module. llvm-svn: 139860 --- clang/lib/Frontend/CompilerInstance.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'clang/lib/Frontend/CompilerInstance.cpp') diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index c56cc3d9db4..92798c8c292 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/lib/Frontend/CompilerInstance.cpp @@ -228,7 +228,10 @@ void CompilerInstance::createPreprocessor() { if (!getHeaderSearchOpts().DisableModuleHash) llvm::sys::path::append(SpecificModuleCache, getInvocation().getModuleHash()); - PP->getHeaderSearchInfo().setModuleCachePath(SpecificModuleCache); + PP->getHeaderSearchInfo().configureModules(SpecificModuleCache, + getPreprocessorOpts().ModuleBuildPath.empty() + ? std::string() + : getPreprocessorOpts().ModuleBuildPath.back()); // Handle generating dependencies, if requested. const DependencyOutputOptions &DepOpts = getDependencyOutputOpts(); -- cgit v1.2.3