diff options
| author | Johnny Chen <johnny.chen@apple.com> | 2011-08-09 23:10:20 +0000 |
|---|---|---|
| committer | Johnny Chen <johnny.chen@apple.com> | 2011-08-09 23:10:20 +0000 |
| commit | ee7a359d59ae0f9e19dc622fc6789c99ccc41ce3 (patch) | |
| tree | 54581137b99a91791bcbac62286e6baa679b8603 /lldb/source/Expression/IRForTarget.cpp | |
| parent | 3d2e0e9db69da97b159c4788f0b1200bc901ebc4 (diff) | |
| download | bcm5719-llvm-ee7a359d59ae0f9e19dc622fc6789c99ccc41ce3.tar.gz bcm5719-llvm-ee7a359d59ae0f9e19dc622fc6789c99ccc41ce3.zip | |
Check log shared pointer before using it.
llvm-svn: 137173
Diffstat (limited to 'lldb/source/Expression/IRForTarget.cpp')
| -rw-r--r-- | lldb/source/Expression/IRForTarget.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lldb/source/Expression/IRForTarget.cpp b/lldb/source/Expression/IRForTarget.cpp index 64b6a89fb8b..7ee88e01b53 100644 --- a/lldb/source/Expression/IRForTarget.cpp +++ b/lldb/source/Expression/IRForTarget.cpp @@ -697,6 +697,7 @@ IRForTarget::CreateResultVariable (llvm::Function &llvm_function) return true; } +#if 0 static void DebugUsers(lldb::LogSP &log, Value *value, uint8_t depth) { if (!depth) @@ -704,18 +705,22 @@ static void DebugUsers(lldb::LogSP &log, Value *value, uint8_t depth) 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, |

