Index: include/llvm/ProfileData/InstrProf.h =================================================================== --- include/llvm/ProfileData/InstrProf.h +++ include/llvm/ProfileData/InstrProf.h @@ -753,7 +753,7 @@ uint32_t InstrProfRecord::getNumValueData(uint32_t ValueKind) const { uint32_t N = 0; - const std::vector &SiteRecords = + ArrayRef SiteRecords = getValueSitesForKind(ValueKind); for (auto &SR : SiteRecords) { N += SR.ValueData.size();