summaryrefslogtreecommitdiffstats
path: root/lld/ELF/LinkerScript.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2018-03-26 18:55:33 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2018-03-26 18:55:33 +0000
commit9c2c938521dd590e1812de9488de3557a0750bfc (patch)
treec040f71f89e2ab069e6b16c769467da6bf44e24b /lld/ELF/LinkerScript.cpp
parent41fb2dba9cc30d08b19655a46ec133fbb3e24351 (diff)
downloadbcm5719-llvm-9c2c938521dd590e1812de9488de3557a0750bfc.tar.gz
bcm5719-llvm-9c2c938521dd590e1812de9488de3557a0750bfc.zip
Reduce code duplication a bit.
Thanks to George Rimar for pointing it out. llvm-svn: 328571
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 81ff5c40ad2..d3a3d29d485 100644
--- a/lld/ELF/LinkerScript.cpp
+++ b/lld/ELF/LinkerScript.cpp
@@ -386,9 +386,9 @@ LinkerScript::computeInputSections(const InputSectionDescription *Cmd) {
// which are common because they are in the default bfd script.
// We do not ignore SHT_REL[A] linker-synthesized sections here because
// want to support scripts that do custom layout for them.
- if (!isa<SyntheticSection>(Sec) &&
- (Sec->Type == SHT_REL || Sec->Type == SHT_RELA))
- continue;
+ if (auto *IS = dyn_cast<InputSection>(Sec))
+ if (IS->getRelocatedSection())
+ continue;
std::string Filename = getFilename(Sec->File);
if (!Cmd->FilePat.match(Filename) ||
OpenPOWER on IntegriCloud