diff options
Diffstat (limited to 'lib/Lex/PPDirectives.cpp')
-rw-r--r-- | lib/Lex/PPDirectives.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Lex/PPDirectives.cpp b/lib/Lex/PPDirectives.cpp index 9caca339be..028593f39c 100644 --- a/lib/Lex/PPDirectives.cpp +++ b/lib/Lex/PPDirectives.cpp @@ -1112,9 +1112,10 @@ void Preprocessor::HandleIncludeDirective(Token &IncludeTok, } // Finally, if all is good, enter the new file! - if (EnterSourceFile(FID, CurDir)) + std::string ErrorStr; + if (EnterSourceFile(FID, CurDir, &ErrorStr)) Diag(FilenameTok, diag::err_pp_error_opening_file) - << std::string(SourceMgr.getFileEntryForID(FID)->getName()); + << std::string(SourceMgr.getFileEntryForID(FID)->getName()) << ErrorStr; } /// HandleIncludeNextDirective - Implements #include_next. |