From e5d642cf5b51db3a82f35c818fd9afbde16f05ee Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Tue, 15 Aug 2017 17:01:28 +0000 Subject: [PATCH] Use ArrayRef instead of std::vector&. llvm-svn: 310930 --- lld/ELF/SyntheticSections.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp index 2f5aa2eb7558..ad7b0987cc83 100644 --- a/lld/ELF/SyntheticSections.cpp +++ b/lld/ELF/SyntheticSections.cpp @@ -1826,16 +1826,16 @@ template GdbIndexSection *elf::createGdbIndex() { return make(std::move(Chunks)); } -static size_t getCuSize(std::vector &C) { +static size_t getCuSize(ArrayRef 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 &C) { +static size_t getAddressAreaSize(ArrayRef Arr) { size_t Ret = 0; - for (GdbIndexChunk &D : C) + for (const GdbIndexChunk &D : Arr) Ret += D.AddressArea.size(); return Ret; }