summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object/COFFObjectFile.cpp
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2018-04-17 01:54:34 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2018-04-17 01:54:34 +0000
commit2f6d00612d62c0da948145574c396c53543e21f4 (patch)
tree156e85ba03819385e033cae9f5ecaeca40465f1f /llvm/lib/Object/COFFObjectFile.cpp
parent10664fc5d32f47f1f58bac3f16c050dd158d9ed8 (diff)
downloadbcm5719-llvm-2f6d00612d62c0da948145574c396c53543e21f4.tar.gz
bcm5719-llvm-2f6d00612d62c0da948145574c396c53543e21f4.zip
COFF: Make SectionChunk::Relocs field an ArrayRef. NFCI.
Differential Revision: https://reviews.llvm.org/D45714 llvm-svn: 330172
Diffstat (limited to 'llvm/lib/Object/COFFObjectFile.cpp')
-rw-r--r--llvm/lib/Object/COFFObjectFile.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/llvm/lib/Object/COFFObjectFile.cpp b/llvm/lib/Object/COFFObjectFile.cpp
index e45246b5776..ab4cc60cbc2 100644
--- a/llvm/lib/Object/COFFObjectFile.cpp
+++ b/llvm/lib/Object/COFFObjectFile.cpp
@@ -1147,13 +1147,10 @@ COFFObjectFile::getCOFFRelocation(const RelocationRef &Reloc) const {
return toRel(Reloc.getRawDataRefImpl());
}
-iterator_range<const coff_relocation *>
+ArrayRef<coff_relocation>
COFFObjectFile::getRelocations(const coff_section *Sec) const {
- const coff_relocation *I = getFirstReloc(Sec, Data, base());
- const coff_relocation *E = I;
- if (I)
- E += getNumberOfRelocations(Sec, Data, base());
- return make_range(I, E);
+ return {getFirstReloc(Sec, Data, base()),
+ getNumberOfRelocations(Sec, Data, base())};
}
#define LLVM_COFF_SWITCH_RELOC_TYPE_NAME(reloc_type) \
OpenPOWER on IntegriCloud