diff options
| author | Zachary Turner <zturner@google.com> | 2016-11-17 01:37:42 +0000 |
|---|---|---|
| committer | Zachary Turner <zturner@google.com> | 2016-11-17 01:37:42 +0000 |
| commit | 4aa8753c8103f1e1988b79325f957a587c150337 (patch) | |
| tree | 9d6111d7b94f298115f955e82d1b4d7053bb332e /lldb/source/Core/ArchSpec.cpp | |
| parent | 004319554cf6044896073b8a305ba9d340ed5f94 (diff) | |
| download | bcm5719-llvm-4aa8753c8103f1e1988b79325f957a587c150337.tar.gz bcm5719-llvm-4aa8753c8103f1e1988b79325f957a587c150337.zip | |
Convert AutoComplete related code to StringRef.
Differential Revision: https://reviews.llvm.org/D26721
llvm-svn: 287188
Diffstat (limited to 'lldb/source/Core/ArchSpec.cpp')
| -rw-r--r-- | lldb/source/Core/ArchSpec.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Core/ArchSpec.cpp b/lldb/source/Core/ArchSpec.cpp index 6886fe19b26..cf7afb83dab 100644 --- a/lldb/source/Core/ArchSpec.cpp +++ b/lldb/source/Core/ArchSpec.cpp @@ -256,8 +256,8 @@ struct ArchDefinition { const char *name; }; -size_t ArchSpec::AutoComplete(const char *name, StringList &matches) { - if (name && name[0]) { +size_t ArchSpec::AutoComplete(llvm::StringRef name, StringList &matches) { + if (!name.empty()) { for (uint32_t i = 0; i < llvm::array_lengthof(g_core_definitions); ++i) { if (NameMatches(g_core_definitions[i].name, eNameMatchStartsWith, name)) matches.AppendString(g_core_definitions[i].name); |

