[llvm] r305535 - Fix build warning on 32-bit targets where sizeof(size_t) < sizeof(long long).
Evgeniy Stepanov via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 15 17:32:12 PDT 2017
Author: eugenis
Date: Thu Jun 15 19:32:11 2017
New Revision: 305535
URL: http://llvm.org/viewvc/llvm-project?rev=305535&view=rev
Log:
Fix build warning on 32-bit targets where sizeof(size_t) < sizeof(long long).
Modified:
llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp
Modified: llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp?rev=305535&r1=305534&r2=305535&view=diff
==============================================================================
--- llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp (original)
+++ llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp Thu Jun 15 19:32:11 2017
@@ -5255,13 +5255,15 @@ Error ModuleSummaryIndexBitcodeReader::p
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;
}
}
More information about the llvm-commits
mailing list