Use StringRef and ArrayRef where possible. This adds an accessor to the
Args class to get a view of the arguments as ArrayRef<const char *>.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
include/lldb/Interpreter/Args.h | ||
---|---|---|
196–197 ↗ | (On Diff #89865) | can this be written return makeArrayRef(m_argv).drop_back();? |
source/API/SBDebugger.cpp | ||
1129 ↗ | (On Diff #89865) | makeArrayRef(categories, len) again seems more readable. |
source/Core/Log.cpp | ||
74–80 ↗ | (On Diff #89865) | How about bool exists = llvm::any(entry.second.channel.categories, [&](const Log::Category &c) { return c.name.equals_lower(category); })); if (exists) { ... } |
unittests/Interpreter/TestArgs.cpp | ||
174 ↗ | (On Diff #89865) | I'd probably use auto here since the function indicates that it's returning an ArrayRef. I don't feel strongly though. |