While writing source-location entries to a PCH file, go through an
interface that can load those source-location entries on demand (from
another PCH file).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84287 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/StmtPrinter.cpp b/lib/AST/StmtPrinter.cpp
index 05d0c26..2af1976 100644
--- a/lib/AST/StmtPrinter.cpp
+++ b/lib/AST/StmtPrinter.cpp
@@ -1289,7 +1289,7 @@
     return;
   }
 
-  if (Policy.Dump) {
+  if (Policy.Dump && &Context) {
     dump(Context.getSourceManager());
     return;
   }