aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/MC/MCObjectSymbolizer.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/MC/MCObjectSymbolizer.h')
-rw-r--r--include/llvm/MC/MCObjectSymbolizer.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/include/llvm/MC/MCObjectSymbolizer.h b/include/llvm/MC/MCObjectSymbolizer.h
index 0e3a17b8f7..555cf5195d 100644
--- a/include/llvm/MC/MCObjectSymbolizer.h
+++ b/include/llvm/MC/MCObjectSymbolizer.h
@@ -15,10 +15,10 @@
#ifndef LLVM_MC_MCOBJECTSYMBOLIZER_H
#define LLVM_MC_MCOBJECTSYMBOLIZER_H
-#include "llvm/ADT/IntervalMap.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/MC/MCSymbolizer.h"
#include "llvm/Object/ObjectFile.h"
+#include <vector>
namespace llvm {
@@ -33,12 +33,8 @@ protected:
const object::ObjectFile *Obj;
typedef DenseMap<uint64_t, object::RelocationRef> AddrToRelocMap;
- // FIXME: Working around a missing SectionRef operator!= by storing
- // DataRefImpl.p instead of SectionRef. Feel free to improve!
- typedef IntervalMap<uint64_t, uintptr_t> AddrToSectionMap;
-
- AddrToSectionMap::Allocator AddrToSectionAllocator;
- AddrToSectionMap AddrToSection;
+ typedef std::vector<object::SectionRef> SortedSectionList;
+ SortedSectionList SortedSections;
// Map a load address to the first relocation that applies there. As far as I
// know, if there are several relocations at the exact same address, they are
@@ -48,6 +44,11 @@ protected:
// relocation (referencing the subtrahend symbol).
AddrToRelocMap AddrToReloc;
+ // Helpers around SortedSections.
+ SortedSectionList::const_iterator findSectionContaining(uint64_t Addr) const;
+ void insertSection(object::SectionRef Section);
+
+
MCObjectSymbolizer(MCContext &Ctx, OwningPtr<MCRelocationInfo> &RelInfo,
const object::ObjectFile *Obj);