summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/HeaderMap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Lex/HeaderMap.cpp')
-rw-r--r--clang/lib/Lex/HeaderMap.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Lex/HeaderMap.cpp b/clang/lib/Lex/HeaderMap.cpp
index e0bf58b6750..7a46fafafa0 100644
--- a/clang/lib/Lex/HeaderMap.cpp
+++ b/clang/lib/Lex/HeaderMap.cpp
@@ -204,7 +204,9 @@ const FileEntry *HeaderMap::LookupFile(
if (Dest.empty())
return nullptr;
- return FM.getFile(Dest);
+ if (auto File = FM.getFile(Dest))
+ return *File;
+ return nullptr;
}
StringRef HeaderMapImpl::lookupFilename(StringRef Filename,
OpenPOWER on IntegriCloud