summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2016-10-20 15:59:08 +0000
committerHans Wennborg <hans@hanshq.net>2016-10-20 15:59:08 +0000
commit7314c48bcbc5d0ebcda1c061c42ad0466b736416 (patch)
tree4bd9f5cad22d88aa86dd4148484933c86a6337a9
parent922b63b7f1ebc53515f1d95f885c2d782cb3b0f3 (diff)
downloadbcm5719-llvm-7314c48bcbc5d0ebcda1c061c42ad0466b736416.tar.gz
bcm5719-llvm-7314c48bcbc5d0ebcda1c061c42ad0466b736416.zip
Fix SectionPiece size when compiling with MSVC
Builds were failing with: InputSection.h(139): error C2338: SectionPiece is too big because MSVC does record layout differently, probably not packing the 'OutputOff' and 'Live' bitfields because their types are of different size. Using size_t for 'Live' seems to fix it. llvm-svn: 284740
-rw-r--r--lld/ELF/InputSection.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lld/ELF/InputSection.h b/lld/ELF/InputSection.h
index fdbe537a490..1efaeafedd6 100644
--- a/lld/ELF/InputSection.h
+++ b/lld/ELF/InputSection.h
@@ -133,7 +133,7 @@ struct SectionPiece {
size_t InputOff;
ssize_t OutputOff : 8 * sizeof(ssize_t) - 1;
- uint32_t Live : 1;
+ size_t Live : 1;
};
static_assert(sizeof(SectionPiece) == 2 * sizeof(size_t),
"SectionPiece is too big");
OpenPOWER on IntegriCloud