summaryrefslogtreecommitdiffstats
path: root/lld/ELF/LinkerScript.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2017-04-06 21:26:03 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2017-04-06 21:26:03 +0000
commit1902b337e97fa794c87598fedecc0ad4a4a05969 (patch)
treef8c15be63724211b0242bf5c65c3b6d4990f98c3 /lld/ELF/LinkerScript.cpp
parent21a438255d621c1c4ef5099b0e006b64b381e610 (diff)
downloadbcm5719-llvm-1902b337e97fa794c87598fedecc0ad4a4a05969.tar.gz
bcm5719-llvm-1902b337e97fa794c87598fedecc0ad4a4a05969.zip
Remove redundant argument. NFC.
llvm-svn: 299713
Diffstat (limited to 'lld/ELF/LinkerScript.cpp')
-rw-r--r--lld/ELF/LinkerScript.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp
index c7a8a056a84..f20dbff3f31 100644
--- a/lld/ELF/LinkerScript.cpp
+++ b/lld/ELF/LinkerScript.cpp
@@ -533,8 +533,7 @@ findSection(StringRef Name, const std::vector<OutputSection *> &Sections) {
// 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::findMemoryRegion(OutputSectionCommand *Cmd,
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(OutputSectionCommand *Cmd) {
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);
OpenPOWER on IntegriCloud