[PATCH] D130234: [lld-macho][NFC] Remove redundant StringRef construction
Daniel Bertalan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 21 06:37:48 PDT 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rG888d0a5ef259: [lld-macho][NFC] Remove redundant StringRef construction (authored by BertalanD).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130234/new/
https://reviews.llvm.org/D130234
Files:
lld/MachO/InputFiles.cpp
Index: lld/MachO/InputFiles.cpp
===================================================================
--- lld/MachO/InputFiles.cpp
+++ lld/MachO/InputFiles.cpp
@@ -903,7 +903,6 @@
if (sym.n_type & N_STAB)
continue;
- StringRef name = strtab + sym.n_strx;
if ((sym.n_type & N_TYPE) == N_SECT) {
Subsections &subsections = sections[sym.n_sect - 1]->subsections;
// parseSections() may have chosen not to parse this section.
@@ -913,7 +912,7 @@
} else if (isUndef(sym)) {
undefineds.push_back(i);
} else {
- symbols[i] = parseNonSectionSymbol(sym, name);
+ symbols[i] = parseNonSectionSymbol(sym, StringRef(strtab + sym.n_strx));
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130234.446471.patch
Type: text/x-patch
Size: 702 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220721/a6cc724e/attachment.bin>
More information about the llvm-commits
mailing list