[lld] r283742 - [ELF] Change argument type for findSections. NFC
Eugene Leviant via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 10 04:23:13 PDT 2016
Author: evgeny777
Date: Mon Oct 10 06:23:12 2016
New Revision: 283742
URL: http://llvm.org/viewvc/llvm-project?rev=283742&view=rev
Log:
[ELF] Change argument type for findSections. NFC
Modified:
lld/trunk/ELF/LinkerScript.cpp
Modified: lld/trunk/ELF/LinkerScript.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LinkerScript.cpp?rev=283742&r1=283741&r2=283742&view=diff
==============================================================================
--- lld/trunk/ELF/LinkerScript.cpp (original)
+++ lld/trunk/ELF/LinkerScript.cpp Mon Oct 10 06:23:12 2016
@@ -461,11 +461,11 @@ template <class ELFT> void LinkerScript<
template <class ELFT>
static std::vector<OutputSectionBase<ELFT> *>
-findSections(OutputSectionCommand &Cmd,
+findSections(StringRef Name,
const std::vector<OutputSectionBase<ELFT> *> &Sections) {
std::vector<OutputSectionBase<ELFT> *> Ret;
for (OutputSectionBase<ELFT> *Sec : Sections)
- if (Sec->getName() == Cmd.Name)
+ if (Sec->getName() == Name)
Ret.push_back(Sec);
return Ret;
}
@@ -475,7 +475,7 @@ void LinkerScript<ELFT>::assignOffsets(O
if (Cmd->LMAExpr)
LMAOffset = Cmd->LMAExpr(Dot) - Dot;
std::vector<OutputSectionBase<ELFT> *> Sections =
- findSections(*Cmd, *OutputSections);
+ findSections(Cmd->Name, *OutputSections);
if (Sections.empty())
return;
switchTo(Sections[0]);
@@ -509,7 +509,7 @@ template <class ELFT> void LinkerScript<
if (!Cmd)
return false;
std::vector<OutputSectionBase<ELFT> *> Secs =
- findSections(*Cmd, *OutputSections);
+ findSections(Cmd->Name, *OutputSections);
if (!Secs.empty())
return false;
for (const std::unique_ptr<BaseCommand> &I : Cmd->Commands)
@@ -530,7 +530,7 @@ template <class ELFT> void LinkerScript<
if (!Cmd)
continue;
std::vector<OutputSectionBase<ELFT> *> Secs =
- findSections(*Cmd, *OutputSections);
+ findSections(Cmd->Name, *OutputSections);
if (!Secs.empty()) {
Flags = Secs[0]->getFlags();
Type = Secs[0]->getType();
More information about the llvm-commits
mailing list