[Lldb-commits] [lldb] r137173 - /lldb/trunk/source/Expression/IRForTarget.cpp
Johnny Chen
johnny.chen at apple.com
Tue Aug 9 16:10:20 PDT 2011
Author: johnny
Date: Tue Aug 9 18:10:20 2011
New Revision: 137173
URL: http://llvm.org/viewvc/llvm-project?rev=137173&view=rev
Log:
Check log shared pointer before using it.
Modified:
lldb/trunk/source/Expression/IRForTarget.cpp
Modified: lldb/trunk/source/Expression/IRForTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRForTarget.cpp?rev=137173&r1=137172&r2=137173&view=diff
==============================================================================
--- lldb/trunk/source/Expression/IRForTarget.cpp (original)
+++ lldb/trunk/source/Expression/IRForTarget.cpp Tue Aug 9 18:10:20 2011
@@ -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,
More information about the lldb-commits
mailing list