summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorAlexander Shaposhnikov <shal1t712@gmail.com>2017-07-04 05:37:37 +0000
committerAlexander Shaposhnikov <shal1t712@gmail.com>2017-07-04 05:37:37 +0000
commit49fc24a8bfd838d99aeb979e0a9af345c62b3d44 (patch)
treeadd5fb691dafa4f0c06f1f3330987b6dc98a4ff6 /llvm
parenta4c5caf67ab973a380d55f859c2d70eb8eab7df3 (diff)
downloadbcm5719-llvm-49fc24a8bfd838d99aeb979e0a9af345c62b3d44.tar.gz
bcm5719-llvm-49fc24a8bfd838d99aeb979e0a9af345c62b3d44.zip
[llvm] Revert "[tablegen] Avoid creating a temporary vector in getInstructionCase"
Revert rL307059 because of the incorrect commit message & patch, will recommit later. llvm-svn: 307061
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/ProfileData/InstrProf.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/include/llvm/ProfileData/InstrProf.h b/llvm/include/llvm/ProfileData/InstrProf.h
index 234c2fbeb03..a6b2850ccd2 100644
--- a/llvm/include/llvm/ProfileData/InstrProf.h
+++ b/llvm/include/llvm/ProfileData/InstrProf.h
@@ -753,8 +753,11 @@ uint32_t InstrProfRecord::getNumValueKinds() const {
uint32_t InstrProfRecord::getNumValueData(uint32_t ValueKind) const {
uint32_t N = 0;
- for (auto &SR : getValueSitesForKind(ValueKind))
+ const std::vector<InstrProfValueSiteRecord> &SiteRecords =
+ getValueSitesForKind(ValueKind);
+ for (auto &SR : SiteRecords) {
N += SR.ValueData.size();
+ }
return N;
}
OpenPOWER on IntegriCloud