Move ownership of Pass File's to the MachoLinkingContext.
authorPete Cooper <peter_cooper@apple.com>
Mon, 21 Mar 2016 23:17:47 +0000 (23:17 +0000)
committerPete Cooper <peter_cooper@apple.com>
Mon, 21 Mar 2016 23:17:47 +0000 (23:17 +0000)
commitc0c464cac1a0d82f6148503777719cbb63a864d6
treef64209f7265ea95bc9a1ede9681673540f905a42
parent602f79275dcb5a65a0bd0e5917763b4f5b1eb904
Move ownership of Pass File's to the MachoLinkingContext.

In trying to fix the leaks in the MachO lld codebase, we need to have
a better model for file and atom ownership.  Having the context own
everything seems like the simplest model, so change all the passes to
allocate File's on the context instead of owning files as a member.

llvm-svn: 264004
lld/include/lld/ReaderWriter/MachOLinkingContext.h
lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp
lld/lib/ReaderWriter/MachO/GOTPass.cpp
lld/lib/ReaderWriter/MachO/ObjCPass.cpp
lld/lib/ReaderWriter/MachO/ShimPass.cpp
lld/lib/ReaderWriter/MachO/StubsPass.cpp
lld/lib/ReaderWriter/MachO/TLVPass.cpp