diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:06:29 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:06:29 +0000 |
| commit | 94994d372d014ce4c8758b9605d63fae651bd8aa (patch) | |
| tree | 51c0b708bd59f205d6b35cb2a8c24d62f0c33d77 /source/Interpreter/OptionValueDictionary.cpp | |
| parent | 39be7ce23363d12ae3e49aeb1fdb2bfeb892e836 (diff) | |
Diffstat (limited to 'source/Interpreter/OptionValueDictionary.cpp')
| -rw-r--r-- | source/Interpreter/OptionValueDictionary.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/source/Interpreter/OptionValueDictionary.cpp b/source/Interpreter/OptionValueDictionary.cpp index 2e8a8427237b..5058064f1ca2 100644 --- a/source/Interpreter/OptionValueDictionary.cpp +++ b/source/Interpreter/OptionValueDictionary.cpp @@ -9,15 +9,11 @@ #include "lldb/Interpreter/OptionValueDictionary.h" -// C Includes -// C++ Includes -// Other libraries and framework includes #include "llvm/ADT/StringRef.h" -// Project includes -#include "lldb/Core/State.h" #include "lldb/DataFormatters/FormatManager.h" #include "lldb/Interpreter/OptionValueString.h" #include "lldb/Utility/Args.h" +#include "lldb/Utility/State.h" using namespace lldb; using namespace lldb_private; @@ -33,16 +29,23 @@ void OptionValueDictionary::DumpValue(const ExecutionContext *exe_ctx, strm.Printf("(%s)", GetTypeAsCString()); } if (dump_mask & eDumpOptionValue) { + const bool one_line = dump_mask & eDumpOptionCommand; if (dump_mask & eDumpOptionType) strm.PutCString(" ="); collection::iterator pos, end = m_values.end(); - strm.IndentMore(); + if (!one_line) + strm.IndentMore(); for (pos = m_values.begin(); pos != end; ++pos) { OptionValue *option_value = pos->second.get(); - strm.EOL(); + + if (one_line) + strm << ' '; + else + strm.EOL(); + strm.Indent(pos->first.GetCString()); const uint32_t extra_dump_options = m_raw_value_dump ? eDumpOptionRaw : 0; @@ -74,7 +77,8 @@ void OptionValueDictionary::DumpValue(const ExecutionContext *exe_ctx, break; } } - strm.IndentLess(); + if (!one_line) + strm.IndentLess(); } } |
