From: Axel Naumann Date: Wed, 20 Aug 2014 10:04:49 +0000 (+0200) Subject: Pass OpenFile to last remaining getFile(). X-Git-Tag: v6-02-00-rc1~354 X-Git-Url: https://root.cern.ch/gitweb?p=root.git;a=commitdiff_plain;h=1d640f7161948c3bf7c1694b31f6e6f4417fb83f Pass OpenFile to last remaining getFile(). --- diff --git a/interpreter/llvm/src/tools/clang/lib/Lex/HeaderSearch.cpp b/interpreter/llvm/src/tools/clang/lib/Lex/HeaderSearch.cpp index 52feed0..91403d7 100644 --- a/interpreter/llvm/src/tools/clang/lib/Lex/HeaderSearch.cpp +++ b/interpreter/llvm/src/tools/clang/lib/Lex/HeaderSearch.cpp @@ -234,7 +234,8 @@ const char *DirectoryLookup::getName() const { static const FileEntry * getFileAndSuggestModule(HeaderSearch &HS, StringRef FileName, const DirectoryEntry *Dir, bool IsSystemHeaderDir, - ModuleMap::KnownHeader *SuggestedModule) { + ModuleMap::KnownHeader *SuggestedModule, + bool OpenFile) { // If we have a module map that might map this header, load it and // check whether we'll have a suggestion for a module. HS.hasModuleMap(FileName, Dir, IsSystemHeaderDir); @@ -255,7 +256,7 @@ getFileAndSuggestModule(HeaderSearch &HS, StringRef FileName, return File; } - return HS.getFileMgr().getFile(FileName, /*openFile=*/true); + return HS.getFileMgr().getFile(FileName, OpenFile); } /// LookupFile - Lookup the specified file in this search path, returning it @@ -290,7 +291,7 @@ const FileEntry *DirectoryLookup::LookupFile( return getFileAndSuggestModule(HS, TmpDir.str(), getDir(), isSystemHeaderDirectory(), - SuggestedModule); + SuggestedModule, OpenFile); } if (isFramework()) @@ -636,7 +637,7 @@ const FileEntry *HeaderSearch::LookupFile( if (const FileEntry *FE = getFileAndSuggestModule(*this, TmpDir.str(), Includer->getDir(), IncluderIsSystemHeader, - SuggestedModule)) { + SuggestedModule, OpenFile)) { // Leave CurDir unset. // This file is a system header or C++ unfriendly if the old file is. //