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/CommandObjectPlatform.cpp | |
parent | 930ebc15a6398710e84eea16b735721fe4a2c2fd (diff) | |
download | bcm5719-llvm-0d9a201e2624998922f825ebbe01aae0cce4bbd5.tar.gz bcm5719-llvm-0d9a201e2624998922f825ebbe01aae0cce4bbd5.zip |
[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/CommandObjectPlatform.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectPlatform.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Commands/CommandObjectPlatform.cpp b/lldb/source/Commands/CommandObjectPlatform.cpp index 0bd12d18283..7fb37839be7 100644 --- a/lldb/source/Commands/CommandObjectPlatform.cpp +++ b/lldb/source/Commands/CommandObjectPlatform.cpp @@ -1336,9 +1336,9 @@ protected: Stream &ostrm = result.GetOutputStream(); for (auto &entry : args.entries()) { lldb::pid_t pid; - if (entry.ref.getAsInteger(0, pid)) { + if (entry.ref().getAsInteger(0, pid)) { result.AppendErrorWithFormat("invalid process ID argument '%s'", - entry.ref.str().c_str()); + entry.ref().str().c_str()); result.SetStatus(eReturnStatusFailed); break; } else { |