diff options
author | Pete Cooper <peter_cooper@apple.com> | 2016-03-22 04:00:41 +0000 |
---|---|---|
committer | Pete Cooper <peter_cooper@apple.com> | 2016-03-22 04:00:41 +0000 |
commit | 3e4d732dd08e9183ba123527df59f05f437c3ef8 (patch) | |
tree | ee83c8f1316f9a69d2a2706d84b76d8a0e6baf6c /lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp | |
parent | 572a87e2aa81e1dfe677645d0d3591fc4ee8239a (diff) | |
download | bcm5719-llvm-3e4d732dd08e9183ba123527df59f05f437c3ef8.tar.gz bcm5719-llvm-3e4d732dd08e9183ba123527df59f05f437c3ef8.zip |
Revert "Use owning pointers instead of raw pointers for Atom's to fix leaks."
This reverts commit r264022.
This breaks the Window's bots which don't like that i'm calling ~Atom when
the this pointer is a sublcass of Atom.
Reverting for now until I try find a better fix. I tried using std::unique_ptr with
a custom deleter as a quick fix, but it didn't work well in the YAML parser.
llvm-svn: 264023
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, |