diff options
Diffstat (limited to 'lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp')
-rw-r--r-- | lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp b/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp index 4431f347b27..1cc87f0fac4 100644 --- a/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp +++ b/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp @@ -171,19 +171,7 @@ bool MachOLinkingContext::sliceFromFatFile(MemoryBufferRef mb, uint32_t &offset, MachOLinkingContext::MachOLinkingContext() {} -MachOLinkingContext::~MachOLinkingContext() { - // Atoms are allocated on BumpPtrAllocator's on File's. - // As we transfer atoms from one file to another, we need to clear all of the - // atoms before we remove any of the BumpPtrAllocator's. - auto &nodes = getNodes(); - for (unsigned i = 0, e = nodes.size(); i != e; ++i) { - FileNode *node = dyn_cast<FileNode>(nodes[i].get()); - if (!node) - continue; - File *file = node->getFile(); - file->clearAtoms(); - } -} +MachOLinkingContext::~MachOLinkingContext() {} void MachOLinkingContext::configure(HeaderFileType type, Arch arch, OS os, uint32_t minOSVersion, |