projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
29dd40b
)
Simplify.
author
Rui Ueyama
<ruiu@google.com>
Thu, 26 Oct 2017 22:30:25 +0000
(22:30 +0000)
committer
Rui Ueyama
<ruiu@google.com>
Thu, 26 Oct 2017 22:30:25 +0000
(22:30 +0000)
Because of the same reason as r316600, I don't think we need a guard
against empty relocations.
llvm-svn: 316710
lld/ELF/SyntheticSections.cpp
patch
|
blob
|
history
diff --git
a/lld/ELF/SyntheticSections.cpp
b/lld/ELF/SyntheticSections.cpp
index
74b4085
..
e3798c8
100644
(file)
--- a/
lld/ELF/SyntheticSections.cpp
+++ b/
lld/ELF/SyntheticSections.cpp
@@
-511,9
+511,7
@@
void EhFrameSection<ELFT>::addSection(InputSectionBase *C) {
if (Sec->Pieces.empty())
return;
- if (Sec->NumRelocations == 0)
- addSectionAux(Sec, makeArrayRef<Elf_Rela>(nullptr, nullptr));
- else if (Sec->AreRelocsRela)
+ if (Sec->AreRelocsRela)
addSectionAux(Sec, Sec->template relas<ELFT>());
else
addSectionAux(Sec, Sec->template rels<ELFT>());