From: Nick Kledzik Date: Fri, 5 Dec 2014 22:03:20 +0000 (+0000) Subject: [mach-o] Pass vectors by reference and name empty vector. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=290cfc6ba56a9e88725d9ad601bd93a4e8a47be0;p=platform%2Fupstream%2Fllvm.git [mach-o] Pass vectors by reference and name empty vector. llvm-svn: 223527 --- diff --git a/lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp b/lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp index 9280ec4..f4c37f1 100644 --- a/lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp +++ b/lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp @@ -67,9 +67,9 @@ struct UnwindInfoPage { class UnwindInfoAtom : public SimpleDefinedAtom { public: UnwindInfoAtom(ArchHandler &archHandler, const File &file, bool isBig, - std::vector commonEncodings, - std::vector personalities, - std::vector pages, uint32_t numLSDAs) + std::vector &personalities, + std::vector &commonEncodings, + std::vector &pages, uint32_t numLSDAs) : SimpleDefinedAtom(file), _archHandler(archHandler), _commonEncodingsOffset(7 * sizeof(uint32_t)), _personalityArrayOffset(_commonEncodingsOffset + @@ -302,6 +302,9 @@ private: // also probably be sorted by frequency. assert(personalities.size() <= 4); + // TODO: Find commmon encodings for use by compressed pages. + std::vector commonEncodings; + // Now sort the entries by final address and fixup the compact encoding to // its final form (i.e. set personality function bits & create DWARF // references where needed). @@ -338,8 +341,8 @@ private: } while (pageStart < unwindInfos.size()); UnwindInfoAtom *unwind = new (_file.allocator()) - UnwindInfoAtom(_archHandler, _file, _isBig, std::vector(), - personalities, pages, numLSDAs); + UnwindInfoAtom(_archHandler, _file, _isBig, personalities, + commonEncodings, pages, numLSDAs); mergedFile->addAtom(*unwind); // Finally, remove all __compact_unwind atoms now that we've processed them.