aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Utility
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Utility')
-rw-r--r--lldb/source/Utility/Args.cpp2
-rw-r--r--lldb/source/Utility/Stream.cpp8
2 files changed, 9 insertions, 1 deletions
diff --git a/lldb/source/Utility/Args.cpp b/lldb/source/Utility/Args.cpp
index 8ba40ba..7eff9cf 100644
--- a/lldb/source/Utility/Args.cpp
+++ b/lldb/source/Utility/Args.cpp
@@ -445,7 +445,7 @@ uint32_t Args::StringToGenericRegister(llvm::StringRef s) {
.Case("pc", LLDB_REGNUM_GENERIC_PC)
.Case("sp", LLDB_REGNUM_GENERIC_SP)
.Case("fp", LLDB_REGNUM_GENERIC_FP)
- .Cases("ra", "lr", LLDB_REGNUM_GENERIC_RA)
+ .Cases({"ra", "lr"}, LLDB_REGNUM_GENERIC_RA)
.Case("flags", LLDB_REGNUM_GENERIC_FLAGS)
.Case("arg1", LLDB_REGNUM_GENERIC_ARG1)
.Case("arg2", LLDB_REGNUM_GENERIC_ARG2)
diff --git a/lldb/source/Utility/Stream.cpp b/lldb/source/Utility/Stream.cpp
index 89dce9f..e9632c3 100644
--- a/lldb/source/Utility/Stream.cpp
+++ b/lldb/source/Utility/Stream.cpp
@@ -202,6 +202,14 @@ void Stream::IndentLess(unsigned amount) {
m_indent_level = 0;
}
+// Create an indentation scope that restores the original indent level when the
+// object goes out of scope (RAII).
+Stream::IndentScope Stream::MakeIndentScope(unsigned indent_amount) {
+ IndentScope indent_scope(*this);
+ IndentMore(indent_amount);
+ return indent_scope;
+}
+
// Get the address size in bytes
uint32_t Stream::GetAddressByteSize() const { return m_addr_size; }