summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp
diff options
context:
space:
mode:
authorNick Kledzik <kledzik@apple.com>2014-12-05 22:03:20 +0000
committerNick Kledzik <kledzik@apple.com>2014-12-05 22:03:20 +0000
commit290cfc6ba56a9e88725d9ad601bd93a4e8a47be0 (patch)
tree20ff73041b68e9b5cea4d51bd1090068256145a2 /lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp
parenta2686713ef3a783b0735e93342ce3d7714f8816e (diff)
downloadbcm5719-llvm-290cfc6ba56a9e88725d9ad601bd93a4e8a47be0.tar.gz
bcm5719-llvm-290cfc6ba56a9e88725d9ad601bd93a4e8a47be0.zip
[mach-o] Pass vectors by reference and name empty vector.
llvm-svn: 223527
Diffstat (limited to 'lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp')
-rw-r--r--lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp b/lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp
index 9280ec43320..f4c37f18cb1 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<uint32_t> commonEncodings,
- std::vector<const Atom *> personalities,
- std::vector<UnwindInfoPage> pages, uint32_t numLSDAs)
+ std::vector<const Atom *> &personalities,
+ std::vector<uint32_t> &commonEncodings,
+ std::vector<UnwindInfoPage> &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<uint32_t> 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<uint32_t>(),
- 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.
OpenPOWER on IntegriCloud