Try to fix failing TestDataFormatterSkipSummary test case.
authorZachary Turner <zturner@google.com>
Fri, 23 Sep 2016 18:11:03 +0000 (18:11 +0000)
committerZachary Turner <zturner@google.com>
Fri, 23 Sep 2016 18:11:03 +0000 (18:11 +0000)
llvm-svn: 282270

lldb/source/Interpreter/OptionGroupValueObjectDisplay.cpp

index 96190e5..f256322 100644 (file)
@@ -135,7 +135,9 @@ Error OptionGroupValueObjectDisplay::SetOptionValue(
     break;
 
   case 'Y':
-    if (option_arg.getAsInteger(0, no_summary_depth)) {
+    if (option_arg.empty())
+      no_summary_depth = 1;
+    else if (option_arg.getAsInteger(0, no_summary_depth)) {
       no_summary_depth = 1;
       error.SetErrorStringWithFormat("invalid pointer depth '%s'",
                                      option_arg.str().c_str());