[lld] r299713 - Remove redundant argument. NFC.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 6 14:26:03 PDT 2017
Author: rafael
Date: Thu Apr 6 16:26:03 2017
New Revision: 299713
URL: http://llvm.org/viewvc/llvm-project?rev=299713&view=rev
Log:
Remove redundant argument. NFC.
Modified:
lld/trunk/ELF/LinkerScript.cpp
lld/trunk/ELF/LinkerScript.h
Modified: lld/trunk/ELF/LinkerScript.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LinkerScript.cpp?rev=299713&r1=299712&r2=299713&view=diff
==============================================================================
--- lld/trunk/ELF/LinkerScript.cpp (original)
+++ lld/trunk/ELF/LinkerScript.cpp Thu Apr 6 16:26:03 2017
@@ -533,8 +533,7 @@ findSection(StringRef Name, const std::v
// This function searches for a memory region to place the given output
// section in. If found, a pointer to the appropriate memory region is
// returned. Otherwise, a nullptr is returned.
-MemoryRegion *LinkerScript::findMemoryRegion(OutputSectionCommand *Cmd,
- OutputSection *Sec) {
+MemoryRegion *LinkerScript::findMemoryRegion(OutputSectionCommand *Cmd) {
// If a memory region name was specified in the output section command,
// then try to find that region first.
if (!Cmd->MemoryRegionName.empty()) {
@@ -551,6 +550,7 @@ MemoryRegion *LinkerScript::findMemoryRe
if (Opt.MemoryRegions.empty())
return nullptr;
+ OutputSection *Sec = Cmd->Sec;
// See if a region can be found by matching section flags.
for (auto &Pair : Opt.MemoryRegions) {
MemoryRegion &M = Pair.second;
@@ -584,7 +584,7 @@ void LinkerScript::assignOffsets(OutputS
Sec->updateAlignment(Cmd->AlignExpr().getValue());
// Try and find an appropriate memory region to assign offsets in.
- CurMemRegion = findMemoryRegion(Cmd, Sec);
+ CurMemRegion = findMemoryRegion(Cmd);
if (CurMemRegion)
Dot = CurMemRegion->Offset;
switchTo(Sec);
Modified: lld/trunk/ELF/LinkerScript.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LinkerScript.h?rev=299713&r1=299712&r2=299713&view=diff
==============================================================================
--- lld/trunk/ELF/LinkerScript.h (original)
+++ lld/trunk/ELF/LinkerScript.h Thu Apr 6 16:26:03 2017
@@ -224,7 +224,7 @@ protected:
std::vector<size_t> getPhdrIndices(StringRef SectionName);
size_t getPhdrIndex(const Twine &Loc, StringRef PhdrName);
- MemoryRegion *findMemoryRegion(OutputSectionCommand *Cmd, OutputSection *Sec);
+ MemoryRegion *findMemoryRegion(OutputSectionCommand *Cmd);
void switchTo(OutputSection *Sec);
void flush();
More information about the llvm-commits
mailing list