Use ArrayRef instead of std::vector&.

llvm-svn: 310930
This commit is contained in:
Rui Ueyama 2017-08-15 17:01:28 +00:00
parent 2114cab93d
commit e5d642cf5b
1 changed files with 4 additions and 4 deletions

View File

@ -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;
}