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/Interpreter/OptionValueDictionary.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/Interpreter/OptionValueDictionary.cpp')
| -rw-r--r-- | lldb/source/Interpreter/OptionValueDictionary.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lldb/source/Interpreter/OptionValueDictionary.cpp b/lldb/source/Interpreter/OptionValueDictionary.cpp index eb66c485bfd..a4022288fcc 100644 --- a/lldb/source/Interpreter/OptionValueDictionary.cpp +++ b/lldb/source/Interpreter/OptionValueDictionary.cpp @@ -111,18 +111,18 @@ Status OptionValueDictionary::SetArgs(const Args &args, return error; } for (const auto &entry : args) { - if (entry.ref.empty()) { + if (entry.ref().empty()) { error.SetErrorString("empty argument"); return error; } - if (!entry.ref.contains('=')) { + if (!entry.ref().contains('=')) { error.SetErrorString( "assign operation takes one or more key=value arguments"); return error; } llvm::StringRef key, value; - std::tie(key, value) = entry.ref.split('='); + std::tie(key, value) = entry.ref().split('='); bool key_valid = false; if (key.empty()) { error.SetErrorString("empty dictionary key"); |

