From: Argyrios Kyrtzidis Date: Fri, 25 Jun 2010 09:03:12 +0000 (+0000) Subject: Print source location when we encounter unhandled statement during PCH writing. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=12bf28f398b5f1684ceb8b471e6ebab360c2b4fd;p=clang Print source location when we encounter unhandled statement during PCH writing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106830 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Frontend/PCHWriterStmt.cpp b/lib/Frontend/PCHWriterStmt.cpp index 66e1529ac6..88554b7a89 100644 --- a/lib/Frontend/PCHWriterStmt.cpp +++ b/lib/Frontend/PCHWriterStmt.cpp @@ -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