diff options
author | Pavel Labath <labath@google.com> | 2017-03-01 10:08:40 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2017-03-01 10:08:40 +0000 |
commit | 5e336903bee9f21420c5b03d9c5552afd14376b9 (patch) | |
tree | fa2a1aa44d05503af31ef35a747a4b6a40cd54ad /lldb/source/Commands/CommandObjectLog.cpp | |
parent | 9c761a36b9a93bff188109502231cc60b96894e1 (diff) | |
download | bcm5719-llvm-5e336903bee9f21420c5b03d9c5552afd14376b9.tar.gz bcm5719-llvm-5e336903bee9f21420c5b03d9c5552afd14376b9.zip |
Modernize Enable/DisableLogChannel interface a bit
Summary:
Use StringRef and ArrayRef where possible. This adds an accessor to the
Args class to get a view of the arguments as ArrayRef<const char *>.
Reviewers: zturner
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D30402
llvm-svn: 296592
Diffstat (limited to 'lldb/source/Commands/CommandObjectLog.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectLog.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lldb/source/Commands/CommandObjectLog.cpp b/lldb/source/Commands/CommandObjectLog.cpp index c10f868dea4..976096387c0 100644 --- a/lldb/source/Commands/CommandObjectLog.cpp +++ b/lldb/source/Commands/CommandObjectLog.cpp @@ -172,8 +172,8 @@ protected: else log_file[0] = '\0'; bool success = m_interpreter.GetDebugger().EnableLog( - channel.c_str(), args.GetConstArgumentVector(), log_file, - m_options.log_options, result.GetErrorStream()); + channel, args.GetArgumentArrayRef(), log_file, m_options.log_options, + result.GetErrorStream()); if (success) result.SetStatus(eReturnStatusSuccessFinishNoResult); else @@ -233,7 +233,7 @@ protected: Log::DisableAllLogChannels(&result.GetErrorStream()); result.SetStatus(eReturnStatusSuccessFinishNoResult); } else { - if (Log::DisableLogChannel(channel, args.GetConstArgumentVector(), + if (Log::DisableLogChannel(channel, args.GetArgumentArrayRef(), result.GetErrorStream())) result.SetStatus(eReturnStatusSuccessFinishNoResult); } |