Rename DoLayout -> HasContents. NFC.
llvm-svn: 277102
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp
index 96808d7..04194fc 100644
--- a/lld/ELF/LinkerScript.cpp
+++ b/lld/ELF/LinkerScript.cpp
@@ -646,7 +646,7 @@
}
void ScriptParser::readSections() {
- Opt.DoLayout = true;
+ Opt.HasContents = true;
expect("{");
while (!Error && !skip("}")) {
StringRef Tok = next();
diff --git a/lld/ELF/LinkerScript.h b/lld/ELF/LinkerScript.h
index 5134888..f5b87f3 100644
--- a/lld/ELF/LinkerScript.h
+++ b/lld/ELF/LinkerScript.h
@@ -105,7 +105,7 @@
// Used to assign sections to headers.
std::vector<PhdrsCommand> PhdrsCommands;
- bool DoLayout = false;
+ bool HasContents = false;
llvm::BumpPtrAllocator Alloc;
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index 6816946..94e77d5 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -224,10 +224,9 @@
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 @@
? Script<ELFT>::X->createPhdrs(OutputSections)
: createPhdrs();
fixHeaders();
- if (ScriptConfig->DoLayout) {
+ if (ScriptConfig->HasContents) {
Script<ELFT>::X->assignAddresses(OutputSections);
} else {
fixSectionAlignments();
@@ -1027,7 +1026,7 @@
// 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);