Use uintX_t instead of unsigned.

This fixes a potential bug when cross linking very large executables
on LLP64 machines such as Windows. On such platform, uintX_t is 64 bits
while unsigned is 32 bits.

llvm-svn: 270327
This commit is contained in:
Rui Ueyama 2016-05-21 19:22:46 +00:00
parent 46207cc1c9
commit 4f798fc358
2 changed files with 2 additions and 2 deletions

View File

@ -1140,7 +1140,7 @@ void EHOutputSection<ELFT>::addSectionAux(EHInputSection<ELFT> *S,
ArrayRef<uint8_t> D = S->getSectionData();
uintX_t Offset = 0;
DenseMap<unsigned, unsigned> OffsetToIndex;
DenseMap<uintX_t, uintX_t> OffsetToIndex;
while (!D.empty()) {
unsigned Index = S->Offsets.size();
S->Offsets.push_back(std::make_pair(Offset, -1));

View File

@ -364,7 +364,7 @@ private:
std::vector<Cie<ELFT>> Cies;
// Maps CIE content + personality to a index in Cies.
llvm::DenseMap<std::pair<StringRef, SymbolBody *>, unsigned> CieMap;
llvm::DenseMap<std::pair<StringRef, SymbolBody *>, uintX_t> CieMap;
bool Finalized = false;
};