X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FDebugInfo%2FDWARFDebugRangeList.h;h=4ee3bdad329999d434ba12568f6c5eb3882216f7;hb=78f686d37cc3b4e70bbfc2acdfcfec8443fd3250;hp=4e34a916f4a39dbd2574fa06499784185cd304b5;hpb=5eae90d727c64ca5b4b43b110521b38dcd9f0de6;p=oota-llvm.git diff --git a/lib/DebugInfo/DWARFDebugRangeList.h b/lib/DebugInfo/DWARFDebugRangeList.h index 4e34a916f4a..4ee3bdad329 100644 --- a/lib/DebugInfo/DWARFDebugRangeList.h +++ b/lib/DebugInfo/DWARFDebugRangeList.h @@ -7,8 +7,8 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_DEBUGINFO_DWARFDEBUGRANGELIST_H -#define LLVM_DEBUGINFO_DWARFDEBUGRANGELIST_H +#ifndef LLVM_LIB_DEBUGINFO_DWARFDEBUGRANGELIST_H +#define LLVM_LIB_DEBUGINFO_DWARFDEBUGRANGELIST_H #include "llvm/Support/DataExtractor.h" #include @@ -17,6 +17,9 @@ namespace llvm { class raw_ostream; +/// DWARFAddressRangesVector - represents a set of absolute address ranges. +typedef std::vector> DWARFAddressRangesVector; + class DWARFDebugRangeList { public: struct RangeListEntry { @@ -50,10 +53,6 @@ public: else return StartAddress == -1ULL; } - bool containsAddress(uint64_t BaseAddress, uint64_t Address) const { - return (BaseAddress + StartAddress <= Address) && - (Address < BaseAddress + EndAddress); - } }; private: @@ -67,10 +66,10 @@ public: void clear(); void dump(raw_ostream &OS) const; bool extract(DataExtractor data, uint32_t *offset_ptr); - /// containsAddress - Returns true if range list contains the given - /// address. Has to be passed base address of the compile unit that - /// references this range list. - bool containsAddress(uint64_t BaseAddress, uint64_t Address) const; + /// getAbsoluteRanges - Returns absolute address ranges defined by this range + /// list. Has to be passed base address of the compile unit referencing this + /// range list. + DWARFAddressRangesVector getAbsoluteRanges(uint64_t BaseAddress) const; }; } // namespace llvm