Check log shared pointer before using it.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137173 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Expression/IRForTarget.cpp b/source/Expression/IRForTarget.cpp
index 64b6a89..7ee88e0 100644
--- a/source/Expression/IRForTarget.cpp
+++ b/source/Expression/IRForTarget.cpp
@@ -697,6 +697,7 @@
return true;
}
+#if 0
static void DebugUsers(lldb::LogSP &log, Value *value, uint8_t depth)
{
if (!depth)
@@ -704,18 +705,22 @@
depth--;
- log->Printf(" <Begin %d users>", value->getNumUses());
+ if (log)
+ log->Printf(" <Begin %d users>", value->getNumUses());
for (Value::use_iterator ui = value->use_begin(), ue = value->use_end();
ui != ue;
++ui)
{
- log->Printf(" <Use %p> %s", *ui, PrintValue(*ui).c_str());
+ if (log)
+ log->Printf(" <Use %p> %s", *ui, PrintValue(*ui).c_str());
DebugUsers(log, *ui, depth);
}
- log->Printf(" <End uses>");
+ if (log)
+ log->Printf(" <End uses>");
}
+#endif
bool
IRForTarget::RewriteObjCConstString (llvm::GlobalVariable *ns_str,