From: Eugene Leviant Date: Mon, 10 Oct 2016 11:23:12 +0000 (+0000) Subject: [ELF] Change argument type for findSections. NFC X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9257764d61e746e016976cd313bc47dbf97cd428;p=platform%2Fupstream%2Fllvm.git [ELF] Change argument type for findSections. NFC llvm-svn: 283742 --- diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp index ab1ef46..cb8a2b6 100644 --- a/lld/ELF/LinkerScript.cpp +++ b/lld/ELF/LinkerScript.cpp @@ -461,11 +461,11 @@ template void LinkerScript::process(BaseCommand &Base) { template static std::vector *> -findSections(OutputSectionCommand &Cmd, +findSections(StringRef Name, const std::vector *> &Sections) { std::vector *> Ret; for (OutputSectionBase *Sec : Sections) - if (Sec->getName() == Cmd.Name) + if (Sec->getName() == Name) Ret.push_back(Sec); return Ret; } @@ -475,7 +475,7 @@ void LinkerScript::assignOffsets(OutputSectionCommand *Cmd) { if (Cmd->LMAExpr) LMAOffset = Cmd->LMAExpr(Dot) - Dot; std::vector *> Sections = - findSections(*Cmd, *OutputSections); + findSections(Cmd->Name, *OutputSections); if (Sections.empty()) return; switchTo(Sections[0]); @@ -509,7 +509,7 @@ template void LinkerScript::adjustSectionsBeforeSorting() { if (!Cmd) return false; std::vector *> Secs = - findSections(*Cmd, *OutputSections); + findSections(Cmd->Name, *OutputSections); if (!Secs.empty()) return false; for (const std::unique_ptr &I : Cmd->Commands) @@ -530,7 +530,7 @@ template void LinkerScript::adjustSectionsBeforeSorting() { if (!Cmd) continue; std::vector *> Secs = - findSections(*Cmd, *OutputSections); + findSections(Cmd->Name, *OutputSections); if (!Secs.empty()) { Flags = Secs[0]->getFlags(); Type = Secs[0]->getType();