diff options
author | Reid Kleckner <rnk@google.com> | 2015-10-20 18:45:57 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2015-10-20 18:45:57 +0000 |
commit | afb9aaefe36fcf038b0193c6eb7c680404667811 (patch) | |
tree | 8d06b1a49944c0e15e4afd0f2e93cd1c2577d407 /clang/lib/Lex/HeaderSearch.cpp | |
parent | c8925b18719f5ee2da586a3f41b3e143c5d3466a (diff) | |
download | llvm-afb9aaefe36fcf038b0193c6eb7c680404667811.zip llvm-afb9aaefe36fcf038b0193c6eb7c680404667811.tar.gz llvm-afb9aaefe36fcf038b0193c6eb7c680404667811.tar.bz2 |
Add back null check removed accidentally in r250554
Fixes PR25262
llvm-svn: 250844
Diffstat (limited to 'clang/lib/Lex/HeaderSearch.cpp')
-rw-r--r-- | clang/lib/Lex/HeaderSearch.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Lex/HeaderSearch.cpp b/clang/lib/Lex/HeaderSearch.cpp index 469d782d..8a686a7 100644 --- a/clang/lib/Lex/HeaderSearch.cpp +++ b/clang/lib/Lex/HeaderSearch.cpp @@ -256,6 +256,8 @@ const FileEntry *HeaderSearch::getFileAndSuggestModule( // If we have a module map that might map this header, load it and // check whether we'll have a suggestion for a module. const FileEntry *File = getFileMgr().getFile(FileName, /*OpenFile=*/true); + if (!File) + return nullptr; // If there is a module that corresponds to this header, suggest it. if (!findUsableModuleForHeader(File, Dir ? Dir : File->getDir(), |