[lld] r310930 - Use ArrayRef instead of std::vector&.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 15 10:01:28 PDT 2017
Author: ruiu
Date: Tue Aug 15 10:01:28 2017
New Revision: 310930
URL: http://llvm.org/viewvc/llvm-project?rev=310930&view=rev
Log:
Use ArrayRef instead of std::vector&.
Modified:
lld/trunk/ELF/SyntheticSections.cpp
Modified: lld/trunk/ELF/SyntheticSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SyntheticSections.cpp?rev=310930&r1=310929&r2=310930&view=diff
==============================================================================
--- lld/trunk/ELF/SyntheticSections.cpp (original)
+++ lld/trunk/ELF/SyntheticSections.cpp Tue Aug 15 10:01:28 2017
@@ -1826,16 +1826,16 @@ template <class ELFT> GdbIndexSection *e
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;
}
More information about the llvm-commits
mailing list