[PATCH] D72718: [llvm-nm] Use `StringRef` over `const std::string &` params
Sam Clegg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 16 14:06:08 PST 2020
sbc100 updated this revision to Diff 238610.
sbc100 added a comment.
- rebase
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72718/new/
https://reviews.llvm.org/D72718
Files:
llvm/tools/llvm-nm/llvm-nm.cpp
Index: llvm/tools/llvm-nm/llvm-nm.cpp
===================================================================
--- llvm/tools/llvm-nm/llvm-nm.cpp
+++ llvm/tools/llvm-nm/llvm-nm.cpp
@@ -708,8 +708,8 @@
}
static void sortAndPrintSymbolList(SymbolicFile &Obj, bool printName,
- const std::string &ArchiveName,
- const std::string &ArchitectureName) {
+ StringRef ArchiveName,
+ StringRef ArchitectureName) {
if (!NoSort) {
using Comparator = bool (*)(const NMSymbol &, const NMSymbol &);
Comparator Cmp;
@@ -1186,8 +1186,8 @@
static void
dumpSymbolNamesFromObject(SymbolicFile &Obj, bool printName,
- const std::string &ArchiveName = std::string(),
- const std::string &ArchitectureName = std::string()) {
+ StringRef ArchiveName = {},
+ StringRef ArchitectureName = {}) {
auto Symbols = Obj.symbols();
if (DynamicSyms) {
const auto *E = dyn_cast<ELFObjectFileBase>(&Obj);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72718.238610.patch
Type: text/x-patch
Size: 1133 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200116/677c744a/attachment.bin>
More information about the llvm-commits
mailing list