summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-04-18 18:24:25 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-04-18 18:24:25 +0000
commite7b068f9f16b7ef356b14c9fe2bf3ccc89345c1f (patch)
treedf43ad387b10ccc2c7bba55cc6d9684a2fea8165 /include
parentb99f33715190b70dbaeca6d825ce592f8e33f34d (diff)
downloadllvm-e7b068f9f16b7ef356b14c9fe2bf3ccc89345c1f.tar.gz
llvm-e7b068f9f16b7ef356b14c9fe2bf3ccc89345c1f.tar.bz2
llvm-e7b068f9f16b7ef356b14c9fe2bf3ccc89345c1f.tar.xz
Add range access to MCAssembler's symbol collection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206631 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/MC/MCAssembler.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/MC/MCAssembler.h b/include/llvm/MC/MCAssembler.h
index 4cfd76765e..26c26c977d 100644
--- a/include/llvm/MC/MCAssembler.h
+++ b/include/llvm/MC/MCAssembler.h
@@ -834,6 +834,9 @@ public:
typedef SymbolDataListType::const_iterator const_symbol_iterator;
typedef SymbolDataListType::iterator symbol_iterator;
+ typedef iterator_range<symbol_iterator> symbol_range;
+ typedef iterator_range<const_symbol_iterator> const_symbol_range;
+
typedef std::vector<std::string> FileNameVectorType;
typedef FileNameVectorType::const_iterator const_file_name_iterator;
@@ -1099,6 +1102,9 @@ public:
symbol_iterator symbol_end() { return Symbols.end(); }
const_symbol_iterator symbol_end() const { return Symbols.end(); }
+ symbol_range symbols() { return make_range(symbol_begin(), symbol_end()); }
+ const_symbol_range symbols() const { return make_range(symbol_begin(), symbol_end()); }
+
size_t symbol_size() const { return Symbols.size(); }
/// @}