diff options
author | Raphael Isemann <teemperor@gmail.com> | 2019-09-13 11:26:48 +0000 |
---|---|---|
committer | Raphael Isemann <teemperor@gmail.com> | 2019-09-13 11:26:48 +0000 |
commit | 0d9a201e2624998922f825ebbe01aae0cce4bbd5 (patch) | |
tree | 3d844315931e3026c40a44de0d2117368e82360d /lldb/source/Commands/CommandObjectLog.cpp | |
parent | 930ebc15a6398710e84eea16b735721fe4a2c2fd (diff) | |
download | llvm-0d9a201e2624998922f825ebbe01aae0cce4bbd5.zip llvm-0d9a201e2624998922f825ebbe01aae0cce4bbd5.tar.gz llvm-0d9a201e2624998922f825ebbe01aae0cce4bbd5.tar.bz2 |
[lldb][NFC] Remove ArgEntry::ref member
The StringRef should always be identical to the C string, so we
might as well just create the StringRef from the C-string. This
might be slightly slower until we implement the storage of ArgEntry
with a string instead of a std::unique_ptr<char[]>. Until then we
have to do the additional strlen on the C string to construct the
StringRef.
llvm-svn: 371842
Diffstat (limited to 'lldb/source/Commands/CommandObjectLog.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectLog.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lldb/source/Commands/CommandObjectLog.cpp b/lldb/source/Commands/CommandObjectLog.cpp index 314405e..3035a64 100644 --- a/lldb/source/Commands/CommandObjectLog.cpp +++ b/lldb/source/Commands/CommandObjectLog.cpp @@ -145,7 +145,7 @@ protected: } // Store into a std::string since we're about to shift the channel off. - const std::string channel = args[0].ref; + const std::string channel = args[0].ref(); args.Shift(); // Shift off the channel char log_file[PATH_MAX]; if (m_options.log_file) @@ -212,7 +212,7 @@ protected: return false; } - const std::string channel = args[0].ref; + const std::string channel = args[0].ref(); args.Shift(); // Shift off the channel if (channel == "all") { Log::DisableAllLogChannels(); @@ -265,7 +265,7 @@ protected: bool success = true; for (const auto &entry : args.entries()) success = - success && Log::ListChannelCategories(entry.ref, output_stream); + success && Log::ListChannelCategories(entry.ref(), output_stream); if (success) result.SetStatus(eReturnStatusSuccessFinishResult); } @@ -291,7 +291,7 @@ protected: result.SetStatus(eReturnStatusFailed); if (args.GetArgumentCount() == 1) { - auto sub_command = args[0].ref; + auto sub_command = args[0].ref(); if (sub_command.equals_lower("enable")) { Timer::SetDisplayDepth(UINT32_MAX); @@ -308,8 +308,8 @@ protected: result.SetStatus(eReturnStatusSuccessFinishResult); } } else if (args.GetArgumentCount() == 2) { - auto sub_command = args[0].ref; - auto param = args[1].ref; + auto sub_command = args[0].ref(); + auto param = args[1].ref(); if (sub_command.equals_lower("enable")) { uint32_t depth; |