diff options
author | Alexey Samsonov <samsonov@google.com> | 2014-03-14 14:22:49 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2014-03-14 14:22:49 +0000 |
commit | 6f07b35b8f7cd4e7ad85d25a968db1daa86535ff (patch) | |
tree | dd0fd53ea0006b6cc14d241f7236ef28364c57c2 /include/llvm/Object | |
parent | 0eba2c94fd92952234cb2fabff9b1be868cd7f5b (diff) | |
download | llvm-6f07b35b8f7cd4e7ad85d25a968db1daa86535ff.tar.gz llvm-6f07b35b8f7cd4e7ad85d25a968db1daa86535ff.tar.bz2 llvm-6f07b35b8f7cd4e7ad85d25a968db1daa86535ff.tar.xz |
[C++11] Introduce SectionRef::relocations() to use range-based loops
Reviewers: rafael
Reviewed By: rafael
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D3077
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203927 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Object')
-rw-r--r-- | include/llvm/Object/ObjectFile.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/Object/ObjectFile.h b/include/llvm/Object/ObjectFile.h index a3301dbe43..b01eb00023 100644 --- a/include/llvm/Object/ObjectFile.h +++ b/include/llvm/Object/ObjectFile.h @@ -112,6 +112,10 @@ public: relocation_iterator relocation_begin() const; relocation_iterator relocation_end() const; + typedef iterator_range<relocation_iterator> relocation_iterator_range; + relocation_iterator_range relocations() const { + return relocation_iterator_range(relocation_begin(), relocation_end()); + } section_iterator getRelocatedSection() const; DataRefImpl getRawDataRefImpl() const; |