[lld] r313550 - [ELF] Remove default argument for lambda.
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 18 11:31:49 PDT 2017
Author: davide
Date: Mon Sep 18 11:31:49 2017
New Revision: 313550
URL: http://llvm.org/viewvc/llvm-project?rev=313550&view=rev
Log:
[ELF] Remove default argument for lambda.
This is not really OK in C++11, and GCc triggers a warning.
We can switch back to default arguments when C++14 will be the
minimum version of the standard supported, see:
http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#974
Ack'ed by Rafael.
Modified:
lld/trunk/ELF/Writer.cpp
Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=313550&r1=313549&r2=313550&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Mon Sep 18 11:31:49 2017
@@ -835,17 +835,17 @@ template <class ELFT> void Writer<ELFT>:
if (Script->Opt.HasSections)
return;
- auto Add = [](StringRef S, int64_t Pos = -1) {
+ auto Add = [](StringRef S, int64_t Pos) {
return addOptionalRegular<ELFT>(S, Out::ElfHeader, Pos, STV_DEFAULT);
};
ElfSym::Bss = Add("__bss_start", 0);
- ElfSym::End1 = Add("end");
- ElfSym::End2 = Add("_end");
- ElfSym::Etext1 = Add("etext");
- ElfSym::Etext2 = Add("_etext");
- ElfSym::Edata1 = Add("edata");
- ElfSym::Edata2 = Add("_edata");
+ ElfSym::End1 = Add("end", -1);
+ ElfSym::End2 = Add("_end", -1);
+ ElfSym::Etext1 = Add("etext", -1);
+ ElfSym::Etext2 = Add("_etext", -1);
+ ElfSym::Edata1 = Add("edata", -1);
+ ElfSym::Edata2 = Add("_edata", -1);
}
// Sort input sections by section name suffixes for
More information about the llvm-commits
mailing list