summaryrefslogtreecommitdiffstats
path: root/gnu/llvm/tools/lld/ELF/LinkerScript.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/llvm/tools/lld/ELF/LinkerScript.cpp')
-rw-r--r--gnu/llvm/tools/lld/ELF/LinkerScript.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/gnu/llvm/tools/lld/ELF/LinkerScript.cpp b/gnu/llvm/tools/lld/ELF/LinkerScript.cpp
index 887ca12537a..3cc235386b8 100644
--- a/gnu/llvm/tools/lld/ELF/LinkerScript.cpp
+++ b/gnu/llvm/tools/lld/ELF/LinkerScript.cpp
@@ -918,12 +918,7 @@ const OutputSectionBase *LinkerScript<ELFT>::getSymbolSection(StringRef S) {
return CurOutSec ? CurOutSec : (*OutputSections)[0];
}
- if (auto *DR = dyn_cast_or_null<DefinedRegular<ELFT>>(Sym))
- return DR->Section ? DR->Section->OutSec : nullptr;
- if (auto *DS = dyn_cast_or_null<DefinedSynthetic>(Sym))
- return DS->Section;
-
- return nullptr;
+ return SymbolTableSection<ELFT>::getOutputSection(Sym);
}
// Returns indices of ELF headers containing specific section, identified