diff options
author | Jim Ingham <jingham@apple.com> | 2012-10-12 17:34:26 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2012-10-12 17:34:26 +0000 |
commit | 28eb57114d05dd100d9b4a56e0a00be85cd09e3b (patch) | |
tree | 61467023c9112981c8ff375d429b244c7b95c475 /lldb/source/Interpreter/Options.cpp | |
parent | e87f41f43e5d5dafa5794a1f78c849a774ea989a (diff) | |
download | bcm5719-llvm-28eb57114d05dd100d9b4a56e0a00be85cd09e3b.tar.gz bcm5719-llvm-28eb57114d05dd100d9b4a56e0a00be85cd09e3b.zip |
Bunch of cleanups for warnings found by the llvm static analyzer.
llvm-svn: 165808
Diffstat (limited to 'lldb/source/Interpreter/Options.cpp')
-rw-r--r-- | lldb/source/Interpreter/Options.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lldb/source/Interpreter/Options.cpp b/lldb/source/Interpreter/Options.cpp index daf631f3b05..484e7789e5a 100644 --- a/lldb/source/Interpreter/Options.cpp +++ b/lldb/source/Interpreter/Options.cpp @@ -439,7 +439,8 @@ Options::GenerateOptionUsage // Different option sets may require different args. StreamString args_str; - cmd->GetFormattedCommandArguments(args_str, opt_set_mask); + if (cmd) + cmd->GetFormattedCommandArguments(args_str, opt_set_mask); // First go through and print all options that take no arguments as // a single string. If a command has "-a" "-b" and "-c", this will show @@ -569,7 +570,8 @@ Options::GenerateOptionUsage } } - if (cmd->WantsRawCommandString() && + if (cmd && + cmd->WantsRawCommandString() && arguments_str.GetSize() > 0) { strm.PutChar('\n'); |