[lld] r271148 - [ELF] Unbreak build with GCC.

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Sat May 28 16:27:44 PDT 2016


Author: davide
Date: Sat May 28 18:27:38 2016
New Revision: 271148

URL: http://llvm.org/viewvc/llvm-project?rev=271148&view=rev
Log:
[ELF] Unbreak build with GCC.

Differential Revision:  http://reviews.llvm.org/D20777

Modified:
    lld/trunk/ELF/InputSection.h

Modified: lld/trunk/ELF/InputSection.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputSection.h?rev=271148&r1=271147&r2=271148&view=diff
==============================================================================
--- lld/trunk/ELF/InputSection.h (original)
+++ lld/trunk/ELF/InputSection.h Sat May 28 18:27:38 2016
@@ -87,7 +87,7 @@ template <class ELFT> InputSectionBase<E
 // SectionPiece represents a piece of splittable section contents.
 struct SectionPiece {
   SectionPiece(size_t Off, ArrayRef<uint8_t> 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<uint8_t> 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:




More information about the llvm-commits mailing list