[PATCH] D76977: [lld-macho] Implement basic export trie
Jez Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 31 19:18:49 PDT 2020
int3 marked 4 inline comments as done.
int3 added inline comments.
================
Comment at: lld/MachO/ExportTrie.cpp:48
+struct TrieNode {
+ typedef ilist<TrieEdge> TrieEdgeList;
+
----------------
ruiu wrote:
> I wonder if you can use std::vector.
yeah that's an option. Probably not worth testing until we have more functionality implemented and can profile against real inputs though
================
Comment at: lld/MachO/ExportTrie.h:23
+ void addSymbol(const Symbol &sym);
+ llvm::SmallVector<char, 128> build();
+
----------------
ruiu wrote:
> I don't think we need to be efficient here. I'd use std::vector<> instead.
There doesn't seem to be a way to wrap an std::vector in a `raw_ostream` though, which I need for the ULEB encoding functions. Would you prefer I use an `std::string` and a `raw_string_ostream` instead?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76977/new/
https://reviews.llvm.org/D76977
More information about the llvm-commits
mailing list