]> granicus.if.org Git - clang/commitdiff
Print source location when we encounter unhandled statement during PCH writing.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Fri, 25 Jun 2010 09:03:12 +0000 (09:03 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Fri, 25 Jun 2010 09:03:12 +0000 (09:03 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106830 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Frontend/PCHWriterStmt.cpp

index 66e1529ac616d476f051c1516b7d072ab3f9bd83..88554b7a89434c67ccc3a4a7f761f2a9ea3f41bb 100644 (file)
@@ -1113,7 +1113,9 @@ void PCHWriter::WriteSubStmt(Stmt *S) {
   
 #ifndef NDEBUG
   if (Writer.Code == pch::STMT_NULL_PTR) {
-    S->dump();
+    SourceManager &SrcMgr
+      = DeclIDs.begin()->first->getASTContext().getSourceManager();
+    S->dump(SrcMgr);
     assert(0 && "Unhandled sub statement writing PCH file");
   }
 #endif