Don't use section names in getFiller. NFC.
This is just faster and avoids using names.
llvm-svn: 302661
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp
index d7858e1..78531db 100644
--- a/lld/ELF/LinkerScript.cpp
+++ b/lld/ELF/LinkerScript.cpp
@@ -1020,10 +1020,10 @@
return true;
}
-Optional<uint32_t> LinkerScript::getFiller(StringRef Name) {
+Optional<uint32_t> LinkerScript::getFiller(OutputSection *Sec) {
for (BaseCommand *Base : Opt.Commands)
if (auto *Cmd = dyn_cast<OutputSectionCommand>(Base))
- if (Cmd->Name == Name)
+ if (Cmd->Sec == Sec)
return Cmd->Filler;
return None;
}