X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FDebugInfo%2FDWARFDebugArangeSet.h;h=837a8e63469ee5626cd657e4a4e172a2dbe92e01;hb=56c15de38a1c43bc0fcfb19fa655d68af3479d7d;hp=d76867615aa1fda56e1c4d817e32030917083604;hpb=7b1bea3ccbf2d1cff66d4287e0cb7bc045802d31;p=oota-llvm.git diff --git a/lib/DebugInfo/DWARFDebugArangeSet.h b/lib/DebugInfo/DWARFDebugArangeSet.h index d76867615aa..837a8e63469 100644 --- a/lib/DebugInfo/DWARFDebugArangeSet.h +++ b/lib/DebugInfo/DWARFDebugArangeSet.h @@ -7,9 +7,10 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_DEBUGINFO_DWARFDEBUGARANGESET_H -#define LLVM_DEBUGINFO_DWARFDEBUGARANGESET_H +#ifndef LLVM_LIB_DEBUGINFO_DWARFDEBUGARANGESET_H +#define LLVM_LIB_DEBUGINFO_DWARFDEBUGARANGESET_H +#include "llvm/ADT/iterator_range.h" #include "llvm/Support/DataExtractor.h" #include @@ -44,8 +45,7 @@ public: private: typedef std::vector DescriptorColl; - typedef DescriptorColl::iterator DescriptorIter; - typedef DescriptorColl::const_iterator DescriptorConstIter; + typedef iterator_range desc_iterator_range; uint32_t Offset; Header HeaderData; @@ -54,19 +54,14 @@ private: public: DWARFDebugArangeSet() { clear(); } void clear(); - void compact(); bool extract(DataExtractor data, uint32_t *offset_ptr); void dump(raw_ostream &OS) const; uint32_t getCompileUnitDIEOffset() const { return HeaderData.CuOffset; } - uint32_t getOffsetOfNextEntry() const { return Offset + HeaderData.Length + 4; } - uint32_t findAddress(uint64_t address) const; - uint32_t getNumDescriptors() const { return ArangeDescriptors.size(); } - const struct Header &getHeader() const { return HeaderData; } - const Descriptor *getDescriptor(uint32_t i) const { - if (i < ArangeDescriptors.size()) - return &ArangeDescriptors[i]; - return NULL; + + desc_iterator_range descriptors() const { + return desc_iterator_range(ArangeDescriptors.begin(), + ArangeDescriptors.end()); } };