diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-09-12 20:41:59 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-09-12 20:41:59 +0000 |
commit | 9a6da6930644b4f2dbe4885b0eb4fc1274ff56a4 (patch) | |
tree | 564e160bd3733af36124ca3b947aaa947eed5763 /lib/Frontend/CompilerInstance.cpp | |
parent | 48822fbd088c4821f15fee5a2957a69a1f98e746 (diff) |
Introduce a cc1-level option to provide the path to the module cache,
where the compiler will look for module files. Eliminates the
egregious hack where we looked into the header search paths for
modules.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139538 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/CompilerInstance.cpp')
-rw-r--r-- | lib/Frontend/CompilerInstance.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/Frontend/CompilerInstance.cpp b/lib/Frontend/CompilerInstance.cpp index bd019e0cf2..1106e48e91 100644 --- a/lib/Frontend/CompilerInstance.cpp +++ b/lib/Frontend/CompilerInstance.cpp @@ -636,14 +636,8 @@ ModuleKey CompilerInstance::loadModule(SourceLocation ImportLoc, CurFile = SourceMgr.getFileEntryForID(SourceMgr.getMainFileID()); // Search for a module with the given name. - std::string Filename = ModuleName.getName().str(); - Filename += ".pcm"; - const DirectoryLookup *CurDir = 0; const FileEntry *ModuleFile - = PP->getHeaderSearchInfo().LookupFile(Filename, /*isAngled=*/false, - /*FromDir=*/0, CurDir, CurFile, - /*SearchPath=*/0, - /*RelativePath=*/0); + = PP->getHeaderSearchInfo().lookupModule(ModuleName.getName()); if (!ModuleFile) { getDiagnostics().Report(ModuleNameLoc, diag::err_module_not_found) << ModuleName.getName() |