[PATCH] D121638: [lld-macho] Avoid using bump-alloc in TrieBuider
Jez Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 14 14:09:36 PDT 2022
int3 accepted this revision.
int3 added inline comments.
This revision is now accepted and ready to land.
================
Comment at: lld/MachO/ExportTrie.cpp:151-152
+ delete node;
+ nodes.clear();
+ exported.clear();
+}
----------------
I don't think these calls are necessary; `clear()` will automatically happen when the `std::vector` destructors get called
================
Comment at: lld/MachO/ExportTrie.cpp:153
+ exported.clear();
+}
TrieNode *TrieBuilder::makeNode() {
----------------
nit: newline between functions
================
Comment at: lld/MachO/ExportTrie.h:25
public:
+ explicit ~TrieBuilder();
void setImageBase(uint64_t addr) { imageBase = addr; }
----------------
do we need this?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121638/new/
https://reviews.llvm.org/D121638
More information about the llvm-commits
mailing list