diff options
| author | George Rimar <grimar@accesssoftek.com> | 2017-03-15 16:07:02 +0000 |
|---|---|---|
| committer | George Rimar <grimar@accesssoftek.com> | 2017-03-15 16:07:02 +0000 |
| commit | 20055d4cd2396c0bcd51063b224e12adf7a21f07 (patch) | |
| tree | 3e6e4320deeca9be29b8c49828278213c765b367 /lld | |
| parent | ffcf0fb1ccc25f819f17742f67e798cab66cc173 (diff) | |
| download | bcm5719-llvm-20055d4cd2396c0bcd51063b224e12adf7a21f07.tar.gz bcm5719-llvm-20055d4cd2396c0bcd51063b224e12adf7a21f07.zip | |
[ELF] - Linkerscript: make Dot public and remove getDot(). NFC.
Suggested by Rui Ueyama,
also groups member variables in a single place, while I am here.
llvm-svn: 297850
Diffstat (limited to 'lld')
| -rw-r--r-- | lld/ELF/LinkerScript.cpp | 10 | ||||
| -rw-r--r-- | lld/ELF/LinkerScript.h | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp index fc56c5fcb8e..69ac57c2f4f 100644 --- a/lld/ELF/LinkerScript.cpp +++ b/lld/ELF/LinkerScript.cpp @@ -1424,7 +1424,7 @@ Expr ScriptParser::readAssert() { return [=] { if (!E()) error(Msg); - return ScriptBase->getDot(); + return ScriptBase->Dot; }; } @@ -1754,7 +1754,7 @@ Expr ScriptParser::readPrimary() { return [=] { return alignTo(E(), E2()); }; } expect(")"); - return [=] { return alignTo(ScriptBase->getDot(), E()); }; + return [=] { return alignTo(ScriptBase->Dot, E()); }; } if (Tok == "CONSTANT") { StringRef Name = readParenLiteral(); @@ -1778,13 +1778,13 @@ Expr ScriptParser::readPrimary() { expect(","); readExpr(); expect(")"); - return [=] { return alignTo(ScriptBase->getDot(), E()); }; + return [=] { return alignTo(ScriptBase->Dot, E()); }; } if (Tok == "DATA_SEGMENT_END") { expect("("); expect("."); expect(")"); - return []() { return ScriptBase->getDot(); }; + return []() { return ScriptBase->Dot; }; } // GNU linkers implements more complicated logic to handle // DATA_SEGMENT_RELRO_END. We instead ignore the arguments and just align to @@ -1795,7 +1795,7 @@ Expr ScriptParser::readPrimary() { expect(","); readExpr(); expect(")"); - return []() { return alignTo(ScriptBase->getDot(), Target->PageSize); }; + return []() { return alignTo(ScriptBase->Dot, Target->PageSize); }; } if (Tok == "SIZEOF") { StringRef Name = readParenLiteral(); diff --git a/lld/ELF/LinkerScript.h b/lld/ELF/LinkerScript.h index 5b6b09c3a4e..82715375876 100644 --- a/lld/ELF/LinkerScript.h +++ b/lld/ELF/LinkerScript.h @@ -252,7 +252,6 @@ protected: // "ScriptConfig" is a bit too long, so define a short name for it. ScriptConfiguration &Opt = *ScriptConfig; - uint64_t Dot; uint64_t ThreadBssOffset = 0; std::function<uint64_t()> LMAOffset; @@ -263,8 +262,10 @@ protected: llvm::DenseSet<InputSectionBase *> AlreadyOutputIS; public: + uint64_t Dot; + std::vector<OutputSection *> *OutputSections; + bool hasPhdrsCommands() { return !Opt.PhdrsCommands.empty(); } - uint64_t getDot() { return Dot; } OutputSection *getOutputSection(const Twine &Loc, StringRef S); uint64_t getOutputSectionSize(StringRef S); void discard(ArrayRef<InputSectionBase *> V); @@ -274,7 +275,6 @@ public: virtual bool isAbsolute(StringRef S) = 0; virtual OutputSection *getSymbolSection(StringRef S) = 0; - std::vector<OutputSection *> *OutputSections; void addOrphanSections(OutputSectionFactory &Factory); void removeEmptyCommands(); void adjustSectionsBeforeSorting(); |

