[ELF] Fix compilation with GCC 5

Remove the default initializer for TrapInstr; all subclasses overwrite
the defaults in their constructors anyway.

This fixes compilation errors like these, with GCC 5.4 on Ubuntu 16.04,
present since SVN r346893:

 In file included from ../tools/lld/ELF/Arch/AArch64.cpp:12:0:
 ../tools/lld/ELF/Target.h:125:49: error: array must be initialized with a brace-enclosed initializer
    std::array<uint8_t, 4> TrapInstr = {0, 0, 0, 0};
                                                  ^
 ../tools/lld/ELF/Target.h:125:49: error: too many initializers for ‘std::array<unsigned char, 4ul>’

Differential Revision: https://reviews.llvm.org/D54569

llvm-svn: 346934
This commit is contained in:
Martin Storsjo 2018-11-15 08:20:18 +00:00
parent 0997403a22
commit 0db45d954b
1 changed files with 1 additions and 1 deletions

View File

@ -122,7 +122,7 @@ public:
// A 4-byte field corresponding to one or more trap instructions, used to pad
// executable OutputSections.
std::array<uint8_t, 4> TrapInstr = {0, 0, 0, 0};
std::array<uint8_t, 4> TrapInstr;
// If a target needs to rewrite calls to __morestack to instead call
// __morestack_non_split when a split-stack enabled caller calls a