[elf2] Address style comments.

llvm-svn: 249368
This commit is contained in:
Michael J. Spencer 2015-10-06 02:13:54 +00:00
parent 95538ca99a
commit 6e78d16b3b
1 changed files with 7 additions and 8 deletions

View File

@ -329,15 +329,14 @@ template <class ELFT> void Writer<ELFT>::createSections() {
DynamicSec.FiniArraySec =
Map.lookup({".fini_array", SHT_FINI_ARRAY, SHF_WRITE | SHF_ALLOC});
auto addStartEnd = [&Symtab](StringRef StartName, StringRef EndName,
OutputSection<ELFT> *OS) {
auto addStartEnd = [&Symtab](StringRef Start, StringRef End,
OutputSection<ELFT> *OS) {
if (OS) {
Symtab.addSyntheticSym<ELFT>(StartName, *OS, 0);
Symtab.addSyntheticSym<ELFT>(EndName, *OS, OS->getSize());
}
else {
Symtab.addIgnoredSym<ELFT>(StartName);
Symtab.addIgnoredSym<ELFT>(EndName);
Symtab.addSyntheticSym<ELFT>(Start, *OS, 0);
Symtab.addSyntheticSym<ELFT>(End, *OS, OS->getSize());
} else {
Symtab.addIgnoredSym<ELFT>(Start);
Symtab.addIgnoredSym<ELFT>(End);
}
};