From 12bf28f398b5f1684ceb8b471e6ebab360c2b4fd Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Fri, 25 Jun 2010 09:03:12 +0000 Subject: [PATCH] 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 --- lib/Frontend/PCHWriterStmt.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- 2.50.1