diff --git a/lld/lib/ReaderWriter/MachO/ExecutableAtoms.hpp b/lld/lib/ReaderWriter/MachO/ExecutableAtoms.hpp index df0414dae805..628cb5ad01dc 100644 --- a/lld/lib/ReaderWriter/MachO/ExecutableAtoms.hpp +++ b/lld/lib/ReaderWriter/MachO/ExecutableAtoms.hpp @@ -97,7 +97,7 @@ public: const File *find(StringRef sym, bool dataSymbolOnly) const override { if (sym.equals("___dso_handle") || sym.equals(_machHeaderSymbolName)) { - _definedAtoms._atoms.push_back(new (_alloc) MachODefinedAtom( + _definedAtoms._atoms.push_back(new (allocator()) MachODefinedAtom( *this, sym, DefinedAtom::scopeLinkageUnit, DefinedAtom::typeMachHeader, DefinedAtom::mergeNo, false, false, ArrayRef(), DefinedAtom::Alignment(12,0))); @@ -128,7 +128,6 @@ private: atom_collection_vector _sharedLibraryAtoms; atom_collection_vector _absoluteAtoms; StringRef _machHeaderSymbolName; - mutable llvm::BumpPtrAllocator _alloc; }; } // namespace mach_o