aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2016-05-21 19:22:46 +0000
committerRui Ueyama <ruiu@google.com>2016-05-21 19:22:46 +0000
commitdeb6c0aefc34ec77daab2d038ddd7673c730326b (patch)
treeff598f574e7f1d3445f54b3c381c698266cec908
parent4133fc861662989ba65a1b5fec8aff719fdec314 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@270327 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--ELF/OutputSections.cpp2
-rw-r--r--ELF/OutputSections.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/ELF/OutputSections.cpp b/ELF/OutputSections.cpp
index 1f08db2c0..b16035bfa 100644
--- a/ELF/OutputSections.cpp
+++ b/ELF/OutputSections.cpp
@@ -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));
diff --git a/ELF/OutputSections.h b/ELF/OutputSections.h
index 9b69dc018..55e623004 100644
--- a/ELF/OutputSections.h
+++ b/ELF/OutputSections.h
@@ -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;
};