diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2019-01-20 15:00:15 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2019-01-20 15:00:15 +0000 |
| commit | 763d4102c9736544f95a61d4d0a9a5be8c5a5df1 (patch) | |
| tree | b4a2965a49e80461fb52cd69d55f966058e7ef4d /contrib/llvm/tools/lldb/source/Interpreter/OptionValueDictionary.cpp | |
| parent | 0e23b2ff8c430cd1145afb7bd55917c326bb1d06 (diff) | |
| parent | 94994d372d014ce4c8758b9605d63fae651bd8aa (diff) | |
Notes
Diffstat (limited to 'contrib/llvm/tools/lldb/source/Interpreter/OptionValueDictionary.cpp')
| -rw-r--r-- | contrib/llvm/tools/lldb/source/Interpreter/OptionValueDictionary.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/contrib/llvm/tools/lldb/source/Interpreter/OptionValueDictionary.cpp b/contrib/llvm/tools/lldb/source/Interpreter/OptionValueDictionary.cpp index 2e8a8427237b..5058064f1ca2 100644 --- a/contrib/llvm/tools/lldb/source/Interpreter/OptionValueDictionary.cpp +++ b/contrib/llvm/tools/lldb/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(); } } |
