diff options
| author | Shankar Easwaran <shankare@codeaurora.org> | 2015-03-20 23:47:00 +0000 |
|---|---|---|
| committer | Shankar Easwaran <shankare@codeaurora.org> | 2015-03-20 23:47:00 +0000 |
| commit | b9c3bacb3bd412667bec634283a1eb810d30d0bb (patch) | |
| tree | 879126109af3c7e078b0c1c3f9cdf61082e2876a /lld/lib/ReaderWriter/ELF/DefaultLayout.h | |
| parent | 1f869d0e1a90f5a4717ded890396a66d4dc5923f (diff) | |
| download | bcm5719-llvm-b9c3bacb3bd412667bec634283a1eb810d30d0bb.tar.gz bcm5719-llvm-b9c3bacb3bd412667bec634283a1eb810d30d0bb.zip | |
[ELF] Use unordered_map for AdditionalSegments
Fix a leftover class during implementation.
llvm-svn: 232864
Diffstat (limited to 'lld/lib/ReaderWriter/ELF/DefaultLayout.h')
| -rw-r--r-- | lld/lib/ReaderWriter/ELF/DefaultLayout.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lld/lib/ReaderWriter/ELF/DefaultLayout.h b/lld/lib/ReaderWriter/ELF/DefaultLayout.h index e457821320d..05c7cddc66a 100644 --- a/lld/lib/ReaderWriter/ELF/DefaultLayout.h +++ b/lld/lib/ReaderWriter/ELF/DefaultLayout.h @@ -139,10 +139,10 @@ public: class AdditionalSegmentHashKey { public: - int64_t operator() (int64_t segmentType, int64_t segmentFlag) const { + int64_t operator()(const AdditionalSegmentKey &k) const { // k.first = SegmentName // k.second = SegmentFlags - return llvm::hash_combine(segmentType, segmentFlag); + return llvm::hash_combine(k.first, k.second); } }; @@ -154,7 +154,8 @@ public: typedef std::unordered_map<SectionKey, AtomSection<ELFT> *, SectionKeyHash, SectionKeyEq> SectionMapT; - typedef std::map<AdditionalSegmentKey, Segment<ELFT> *> AdditionalSegmentMapT; + typedef std::unordered_map<AdditionalSegmentKey, Segment<ELFT> *, + AdditionalSegmentHashKey> AdditionalSegmentMapT; typedef std::unordered_map<SegmentKey, Segment<ELFT> *, SegmentHashKey> SegmentMapT; |

