]> granicus.if.org Git - clang/commitdiff
[modules] Improve error message on failed module load due to a missing file to
authorRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 13 Oct 2015 01:26:26 +0000 (01:26 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 13 Oct 2015 01:26:26 +0000 (01:26 +0000)
say which module file referenced the missing file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250140 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Serialization/ASTReader.cpp

index 5fd5e782a8639cd389b8cd7996526fc456e982d2..59347de9c17d3d115746a9a079e6b4c85ec5cd2e 100644 (file)
@@ -1948,7 +1948,9 @@ InputFile ASTReader::getInputFile(ModuleFile &F, unsigned ID, bool Complain) {
     if (Complain) {
       std::string ErrorStr = "could not find file '";
       ErrorStr += Filename;
-      ErrorStr += "' referenced by AST file";
+      ErrorStr += "' referenced by AST file '";
+      ErrorStr += F.FileName;
+      ErrorStr += "'";
       Error(ErrorStr.c_str());
     }
     // Record that we didn't find the file.