[PATCH] D120913: [NFC][llvm-nm] create a new helper function exportSymbolNamesFromFiles for --export-symbols
Digger Lin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 8 10:16:27 PST 2022
DiggerLin added a comment.
do we still another NFC patch to archive your suggestion as "https://reviews.llvm.org/D112735" ?
struct NMObject {
std::unique_ptr<Binary> Bin; // Possibly any other members that might be necessary to store archive members.
StringRef ArchiveName;
StringRef ArchitectureName;
};
......
static std::vector<NMObject> getObjectsFromFile(StringRef InputFile) {
std::vector<NMObject> Objects;
/*
Code from dumpSymbolNamesFromFile which retrieves the objects (and archive properties, if appropriate) inside a binary (may be a single object, or many).
Emplace an NMObject in the vector for each such constructed object, instead of calling dumpSymbolNamesFromObject.
*/
return Objects;
}
I think the logic of the patch most meet your requirement , My suggestion we can stop to do further refactor for your suggestion.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120913/new/
https://reviews.llvm.org/D120913
More information about the llvm-commits
mailing list