]> granicus.if.org Git - clang/commitdiff
[ASTReader] Improve ReadASTBlock error message when module not available
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Tue, 7 Feb 2017 21:55:02 +0000 (21:55 +0000)
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Tue, 7 Feb 2017 21:55:02 +0000 (21:55 +0000)
Point to the PCM file that could not be found.

rdar://problem/30381981

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

lib/Serialization/ASTReader.cpp

index 67c7e46099738e8f2190c81de8830d9bf99ca8fb..1b65ecbe98ab39bf9b7cad41752022060adf2726 100644 (file)
@@ -2965,7 +2965,10 @@ ASTReader::ReadASTBlock(ModuleFile &F, unsigned ClientLoadCapabilities) {
         Data += Len;
         ModuleFile *OM = ModuleMgr.lookup(Name);
         if (!OM) {
-          Error("SourceLocation remap refers to unknown module");
+          std::string Msg =
+              "SourceLocation remap refers to unknown module, cannot find ";
+          Msg.append(Name);
+          Error(Msg);
           return Failure;
         }