[PATCH] D14910: [RuntimeDyld] DenseMap -> std::unordered_map
Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 3 13:31:07 PST 2015
This revision was automatically updated to reflect the committed changes.
Closed by commit rL254651: [RuntimeDyld] DenseMap -> std::unordered_map (authored by kfischer).
Changed prior to commit:
http://reviews.llvm.org/D14910?vs=41064&id=41797#toc
Repository:
rL LLVM
http://reviews.llvm.org/D14910
Files:
llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h
Index: llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h
===================================================================
--- llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h
+++ llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h
@@ -30,6 +30,7 @@
#include "llvm/Support/SwapByteOrder.h"
#include "llvm/Support/raw_ostream.h"
#include <map>
+#include <unordered_map>
#include <system_error>
using namespace llvm;
@@ -264,7 +265,7 @@
// Relocations to sections already loaded. Indexed by SectionID which is the
// source of the address. The target where the address will be written is
// SectionID/Offset in the relocation itself.
- DenseMap<unsigned, RelocationList> Relocations;
+ std::unordered_map<unsigned, RelocationList> Relocations;
// Relocations to external symbols that are not yet resolved. Symbols are
// external when they aren't found in the global symbol table of all loaded
Index: llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
===================================================================
--- llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
+++ llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
@@ -97,11 +97,11 @@
// The Section here (Sections[i]) refers to the section in which the
// symbol for the relocation is located. The SectionID in the relocation
// entry provides the section to which the relocation will be applied.
- int Idx = it->getFirst();
+ int Idx = it->first;
uint64_t Addr = Sections[Idx].getLoadAddress();
DEBUG(dbgs() << "Resolving relocations Section #" << Idx << "\t"
<< format("%p", (uintptr_t)Addr) << "\n");
- resolveRelocationList(it->getSecond(), Addr);
+ resolveRelocationList(it->second, Addr);
}
Relocations.clear();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14910.41797.patch
Type: text/x-patch
Size: 1831 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151203/49dc1623/attachment.bin>
More information about the llvm-commits
mailing list