diff options
author | Rui Ueyama <ruiu@google.com> | 2017-08-15 17:01:28 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2017-08-15 17:01:28 +0000 |
commit | e5d642cf5b51db3a82f35c818fd9afbde16f05ee (patch) | |
tree | 2c3bf70bf807e58aec156af640149defdf0ce2ad | |
parent | 2114cab93d092f4cd268273c6baa9ec5438507da (diff) | |
download | bcm5719-llvm-e5d642cf5b51db3a82f35c818fd9afbde16f05ee.tar.gz bcm5719-llvm-e5d642cf5b51db3a82f35c818fd9afbde16f05ee.zip |
Use ArrayRef instead of std::vector&.
llvm-svn: 310930
-rw-r--r-- | lld/ELF/SyntheticSections.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp index 2f5aa2eb755..ad7b0987cc8 100644 --- a/lld/ELF/SyntheticSections.cpp +++ b/lld/ELF/SyntheticSections.cpp @@ -1826,16 +1826,16 @@ template <class ELFT> GdbIndexSection *elf::createGdbIndex() { return make<GdbIndexSection>(std::move(Chunks)); } -static size_t getCuSize(std::vector<GdbIndexChunk> &C) { +static size_t getCuSize(ArrayRef<GdbIndexChunk> Arr) { size_t Ret = 0; - for (GdbIndexChunk &D : C) + for (const GdbIndexChunk &D : Arr) Ret += D.CompilationUnits.size(); return Ret; } -static size_t getAddressAreaSize(std::vector<GdbIndexChunk> &C) { +static size_t getAddressAreaSize(ArrayRef<GdbIndexChunk> Arr) { size_t Ret = 0; - for (GdbIndexChunk &D : C) + for (const GdbIndexChunk &D : Arr) Ret += D.AddressArea.size(); return Ret; } |