test commit (spelling correction)
[oota-llvm.git] / lib / DebugInfo / DWARFDebugArangeSet.h
index 49a713201d1f65884efe2c755147375c0dae2449..837a8e63469ee5626cd657e4a4e172a2dbe92e01 100644 (file)
@@ -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 <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());
   }
 };