Fix build warning on 32-bit targets where sizeof(size_t) < sizeof(long long).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305535 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evgeniy Stepanov 2017-06-16 00:32:11 +00:00
parent 3184f8d7bb
commit 1410aba438

View File

@ -5255,13 +5255,15 @@ Error ModuleSummaryIndexBitcodeReader::parseEntireSummary(unsigned ID) {
case bitc::FS_CFI_FUNCTION_DEFS: {
std::set<std::string> &CfiFunctionDefs = TheIndex.cfiFunctionDefs();
for (unsigned I = 0; I != Record.size(); I += 2)
CfiFunctionDefs.insert({Strtab.data() + Record[I], Record[I+1]});
CfiFunctionDefs.insert(
{Strtab.data() + Record[I], static_cast<size_t>(Record[I + 1])});
break;
}
case bitc::FS_CFI_FUNCTION_DECLS: {
std::set<std::string> &CfiFunctionDecls = TheIndex.cfiFunctionDecls();
for (unsigned I = 0; I != Record.size(); I += 2)
CfiFunctionDecls.insert({Strtab.data() + Record[I], Record[I+1]});
CfiFunctionDecls.insert(
{Strtab.data() + Record[I], static_cast<size_t>(Record[I + 1])});
break;
}
}