aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm/lib/DebugInfo/DWARFDebugArangeSet.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm/lib/DebugInfo/DWARFDebugArangeSet.h')
-rw-r--r--contrib/llvm/lib/DebugInfo/DWARFDebugArangeSet.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/contrib/llvm/lib/DebugInfo/DWARFDebugArangeSet.h b/contrib/llvm/lib/DebugInfo/DWARFDebugArangeSet.h
index 49a713201d1f..d6c2d8b27c52 100644
--- a/contrib/llvm/lib/DebugInfo/DWARFDebugArangeSet.h
+++ b/contrib/llvm/lib/DebugInfo/DWARFDebugArangeSet.h
@@ -10,6 +10,7 @@
#ifndef LLVM_DEBUGINFO_DWARFDEBUGARANGESET_H
#define LLVM_DEBUGINFO_DWARFDEBUGARANGESET_H
+#include "llvm/ADT/iterator_range.h"
#include "llvm/Support/DataExtractor.h"
#include <vector>
@@ -44,7 +45,7 @@ public:
private:
typedef std::vector<Descriptor> DescriptorColl;
- typedef DescriptorColl::const_iterator DescriptorConstIter;
+ typedef iterator_range<DescriptorColl::const_iterator> desc_iterator_range;
uint32_t Offset;
Header HeaderData;
@@ -57,11 +58,10 @@ public:
void dump(raw_ostream &OS) const;
uint32_t getCompileUnitDIEOffset() const { return HeaderData.CuOffset; }
- uint32_t getNumDescriptors() const { return ArangeDescriptors.size(); }
- 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());
}
};