[lld] r296586 - Instead of passing an empty ArrayRef as contents, pass actual contents. NFC.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 28 23:39:06 PST 2017
Author: ruiu
Date: Wed Mar 1 01:39:06 2017
New Revision: 296586
URL: http://llvm.org/viewvc/llvm-project?rev=296586&view=rev
Log:
Instead of passing an empty ArrayRef as contents, pass actual contents. NFC.
Modified:
lld/trunk/ELF/SyntheticSections.cpp
Modified: lld/trunk/ELF/SyntheticSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SyntheticSections.cpp?rev=296586&r1=296585&r2=296586&view=diff
==============================================================================
--- lld/trunk/ELF/SyntheticSections.cpp (original)
+++ lld/trunk/ELF/SyntheticSections.cpp Wed Mar 1 01:39:06 2017
@@ -291,14 +291,14 @@ MipsReginfoSection<ELFT> *MipsReginfoSec
}
InputSection *elf::createInterpSection() {
- auto *Ret = make<InputSection>(SHF_ALLOC, SHT_PROGBITS, 1,
- ArrayRef<uint8_t>(), ".interp");
- Ret->Live = true;
-
// StringSaver guarantees that the returned string ends with '\0'.
StringRef S = Saver.save(Config->DynamicLinker);
- Ret->Data = {(const uint8_t *)S.data(), S.size() + 1};
- return Ret;
+ ArrayRef<uint8_t> Contents = {(const uint8_t *)S.data(), S.size() + 1};
+
+ auto *Sec =
+ make<InputSection>(SHF_ALLOC, SHT_PROGBITS, 1, Contents, ".interp");
+ Sec->Live = true;
+ return Sec;
}
template <class ELFT>
More information about the llvm-commits
mailing list