From 6f07b35b8f7cd4e7ad85d25a968db1daa86535ff Mon Sep 17 00:00:00 2001 From: Alexey Samsonov Date: Fri, 14 Mar 2014 14:22:49 +0000 Subject: [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 --- include/llvm/Object/ObjectFile.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/llvm/Object') 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_range; + relocation_iterator_range relocations() const { + return relocation_iterator_range(relocation_begin(), relocation_end()); + } section_iterator getRelocatedSection() const; DataRefImpl getRawDataRefImpl() const; -- cgit v1.2.3