[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
This commit is contained in:
Alexander Shaposhnikov 2017-07-04 05:37:37 +00:00
parent a4c5caf67a
commit 49fc24a8bf
1 changed files with 4 additions and 1 deletions

View File

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