[PATCH] D20777: Unbreak gcc.

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


This revision was automatically updated to reflect the committed changes.
Closed by commit rL271148: [ELF] Unbreak build with GCC. (authored by davide).

Changed prior to commit:
  http://reviews.llvm.org/D20777?vs=58907&id=58908#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D20777

Files:
  lld/trunk/ELF/InputSection.h

Index: lld/trunk/ELF/InputSection.h
===================================================================
--- lld/trunk/ELF/InputSection.h
+++ lld/trunk/ELF/InputSection.h
@@ -87,7 +87,7 @@
 // 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 @@
   // 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:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20777.58908.patch
Type: text/x-patch
Size: 825 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160528/8d2ef48d/attachment.bin>


More information about the llvm-commits mailing list