File can become 0 if #include-ing non-existant file.

This commit is contained in:
Vassil Vassilev 2014-08-21 15:58:59 +02:00 committed by sftnight
parent b538604dc0
commit 9ec9b36a4a

View File

@ -218,7 +218,9 @@ namespace cling {
llvm::StringRef SearchPath,
llvm::StringRef RelativePath,
const clang::Module *Imported) {
assert(File && "Must have a valid File");
// If File is 0 this means that the #included file doesn't exist.
if (!File)
return;
auto found = m_Map.find(File);
if (found == m_Map.end())