From c5b612b8b441ca4c39218bd0d35d29b6ed7bebf5 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Wed, 10 May 2017 14:01:13 +0000 Subject: Don't use section names in getFiller. NFC. This is just faster and avoids using names. llvm-svn: 302661 --- lld/ELF/LinkerScript.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lld/ELF/LinkerScript.cpp') diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp index d7858e173c7..78531dbc93e 100644 --- a/lld/ELF/LinkerScript.cpp +++ b/lld/ELF/LinkerScript.cpp @@ -1020,10 +1020,10 @@ bool LinkerScript::ignoreInterpSection() { return true; } -Optional LinkerScript::getFiller(StringRef Name) { +Optional LinkerScript::getFiller(OutputSection *Sec) { for (BaseCommand *Base : Opt.Commands) if (auto *Cmd = dyn_cast(Base)) - if (Cmd->Name == Name) + if (Cmd->Sec == Sec) return Cmd->Filler; return None; } -- cgit v1.2.3