[lld] r295937 - Use isa<MergeInputSection> to check if a section is a merge section.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 22 22:47:19 PST 2017
Author: ruiu
Date: Thu Feb 23 00:47:18 2017
New Revision: 295937
URL: http://llvm.org/viewvc/llvm-project?rev=295937&view=rev
Log:
Use isa<MergeInputSection> to check if a section is a merge section.
We have InputSection, MergeInputSection and EhInputSection, so
isa<MergeInputSection> is equivalent to !isa<InputSection> && !isa<
EhInputSection>.
Modified:
lld/trunk/ELF/InputFiles.cpp
Modified: lld/trunk/ELF/InputFiles.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputFiles.cpp?rev=295937&r1=295936&r2=295937&view=diff
==============================================================================
--- lld/trunk/ELF/InputFiles.cpp (original)
+++ lld/trunk/ELF/InputFiles.cpp Thu Feb 23 00:47:18 2017
@@ -381,7 +381,7 @@ elf::ObjectFile<ELFT>::createInputSectio
if (Target->FirstRelocation)
fatal(toString(this) +
": multiple relocation sections to one section are not supported");
- if (!isa<InputSection<ELFT>>(Target) && !isa<EhInputSection<ELFT>>(Target))
+ if (isa<MergeInputSection<ELFT>>(Target))
fatal(toString(this) +
": relocations pointing to SHF_MERGE are not supported");
More information about the llvm-commits
mailing list