mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-28 10:46:11 +00:00
[ELF] Change argument type for findSections. NFC
llvm-svn: 283742
This commit is contained in:
parent
4aea8e8a39
commit
9257764d61
@ -461,11 +461,11 @@ template <class ELFT> void LinkerScript<ELFT>::process(BaseCommand &Base) {
|
||||
|
||||
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(OutputSectionCommand *Cmd) {
|
||||
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<ELFT>::adjustSectionsBeforeSorting() {
|
||||
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<ELFT>::adjustSectionsBeforeSorting() {
|
||||
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();
|
||||
|
Loading…
Reference in New Issue
Block a user