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/CommandObjectRegister.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/CommandObjectRegister.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectRegister.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lldb/source/Commands/CommandObjectRegister.cpp b/lldb/source/Commands/CommandObjectRegister.cpp index eedfe3c..13266f8 100644 --- a/lldb/source/Commands/CommandObjectRegister.cpp +++ b/lldb/source/Commands/CommandObjectRegister.cpp @@ -206,7 +206,7 @@ protected: // consistent towards the user and allow them to say reg read $rbx - // internally, however, we should be strict and not allow ourselves // to call our registers $rbx in our own API - auto arg_str = entry.ref; + auto arg_str = entry.ref(); arg_str.consume_front("$"); reg_info = reg_ctx->GetRegisterInfoByName(arg_str); @@ -335,8 +335,8 @@ protected: "register write takes exactly 2 arguments: <reg-name> <value>"); result.SetStatus(eReturnStatusFailed); } else { - auto reg_name = command[0].ref; - auto value_str = command[1].ref; + auto reg_name = command[0].ref(); + auto value_str = command[1].ref(); // in most LLDB commands we accept $rbx as the name for register RBX - // and here we would reject it and non-existant. we should be more |