From e6c8fa4530b1a129faaca5f4354078e65543abc3 Mon Sep 17 00:00:00 2001 From: Davide Italiano Date: Sat, 28 May 2016 23:27:38 +0000 Subject: [PATCH] [ELF] Unbreak build with GCC. Differential Revision: http://reviews.llvm.org/D20777 llvm-svn: 271148 --- lld/ELF/InputSection.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lld/ELF/InputSection.h b/lld/ELF/InputSection.h index 608a403af027..b4717389a3df 100644 --- a/lld/ELF/InputSection.h +++ b/lld/ELF/InputSection.h @@ -87,7 +87,7 @@ template InputSectionBase InputSectionBase::Discarded; // SectionPiece represents a piece of splittable section contents. struct SectionPiece { SectionPiece(size_t Off, ArrayRef Data) - : InputOff(Off), Data((uint8_t *)Data.data()), Size(Data.size()), + : InputOff(Off), Data((const uint8_t *)Data.data()), Size(Data.size()), Live(!Config->GcSections) {} ArrayRef data() { return {Data, Size}; } @@ -100,7 +100,7 @@ private: // We use bitfields because SplitInputSection is accessed by // std::upper_bound very often. // We want to save bits to make it cache friendly. - uint8_t *Data; + const uint8_t *Data; uint32_t Size : 31; public: