Don't access the process in expressions w/o checking that
the process exists.

I also added some tests that crash before this fix, and work correctly after.

<rdar://problem/29083321>

llvm-svn: 285974
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
index 95efb5c..1df6246 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
@@ -808,9 +808,9 @@
     if (log)
       log->Printf("%s - Currrent expression language is %s\n", __FUNCTION__,
                   Language::GetNameForLanguageType(lang));
-
-    if (lang != lldb::eLanguageTypeUnknown) {
-      auto runtime = exe_ctx.GetProcessSP()->GetLanguageRuntime(lang);
+    lldb::ProcessSP process_sp = exe_ctx.GetProcessSP();
+    if (process_sp && lang != lldb::eLanguageTypeUnknown) {
+      auto runtime = process_sp->GetLanguageRuntime(lang);
       if (runtime)
         runtime->GetIRPasses(custom_passes);
     }