[lld] r277102 - Rename DoLayout -> HasContents. NFC.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 28 20:31:09 PDT 2016
Author: ruiu
Date: Thu Jul 28 22:31:09 2016
New Revision: 277102
URL: http://llvm.org/viewvc/llvm-project?rev=277102&view=rev
Log:
Rename DoLayout -> HasContents. NFC.
Modified:
lld/trunk/ELF/LinkerScript.cpp
lld/trunk/ELF/LinkerScript.h
lld/trunk/ELF/Writer.cpp
Modified: lld/trunk/ELF/LinkerScript.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LinkerScript.cpp?rev=277102&r1=277101&r2=277102&view=diff
==============================================================================
--- lld/trunk/ELF/LinkerScript.cpp (original)
+++ lld/trunk/ELF/LinkerScript.cpp Thu Jul 28 22:31:09 2016
@@ -646,7 +646,7 @@ void ScriptParser::readSearchDir() {
}
void ScriptParser::readSections() {
- Opt.DoLayout = true;
+ Opt.HasContents = true;
expect("{");
while (!Error && !skip("}")) {
StringRef Tok = next();
Modified: lld/trunk/ELF/LinkerScript.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LinkerScript.h?rev=277102&r1=277101&r2=277102&view=diff
==============================================================================
--- lld/trunk/ELF/LinkerScript.h (original)
+++ lld/trunk/ELF/LinkerScript.h Thu Jul 28 22:31:09 2016
@@ -105,7 +105,7 @@ struct ScriptConfiguration {
// Used to assign sections to headers.
std::vector<PhdrsCommand> PhdrsCommands;
- bool DoLayout = false;
+ bool HasContents = false;
llvm::BumpPtrAllocator Alloc;
Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=277102&r1=277101&r2=277102&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Thu Jul 28 22:31:09 2016
@@ -224,10 +224,9 @@ template <class ELFT> void Writer<ELFT>:
CommonInputSection<ELFT> Common;
CommonInputSection<ELFT>::X = &Common;
- OutputSections =
- ScriptConfig->DoLayout
- ? Script<ELFT>::X->createSections(Factory)
- : createSections();
+ OutputSections = ScriptConfig->HasContents
+ ? Script<ELFT>::X->createSections(Factory)
+ : createSections();
finalizeSections();
if (HasError)
return;
@@ -239,7 +238,7 @@ template <class ELFT> void Writer<ELFT>:
? Script<ELFT>::X->createPhdrs(OutputSections)
: createPhdrs();
fixHeaders();
- if (ScriptConfig->DoLayout) {
+ if (ScriptConfig->HasContents) {
Script<ELFT>::X->assignAddresses(OutputSections);
} else {
fixSectionAlignments();
@@ -1027,7 +1026,7 @@ template <class ELFT> void Writer<ELFT>:
// sections. These are special, we do not include them into output sections
// list, but have them to simplify the code.
template <class ELFT> void Writer<ELFT>::fixHeaders() {
- uintX_t BaseVA = ScriptConfig->DoLayout ? 0 : Config->ImageBase;
+ uintX_t BaseVA = ScriptConfig->HasContents ? 0 : Config->ImageBase;
Out<ELFT>::ElfHeader->setVA(BaseVA);
uintX_t Off = Out<ELFT>::ElfHeader->getSize();
Out<ELFT>::ProgramHeaders->setVA(Off + BaseVA);
More information about the llvm-commits
mailing list