Add a symbols() range and use a range loop.
[oota-llvm.git] / include / llvm / Object / SymbolicFile.h
index 1133736945562ed6c230080271e7250a78163452..40015ec9f6dbe80fad159b20ba1c28e598fcc6e4 100644 (file)
@@ -136,6 +136,10 @@ public:
   basic_symbol_iterator symbol_end() const {
     return symbol_end_impl();
   }
+  typedef iterator_range<basic_symbol_iterator> basic_symbol_iterator_range;
+  basic_symbol_iterator_range symbols() const {
+    return basic_symbol_iterator_range(symbol_begin(), symbol_end());
+  }
 
   // construction aux.
   static ErrorOr<SymbolicFile *> createIRObjectFile(MemoryBuffer *Object,