summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/ELF/OutputSections.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp
index fd08dfbb0f5..53835cb9bd2 100644
--- a/lld/ELF/OutputSections.cpp
+++ b/lld/ELF/OutputSections.cpp
@@ -861,8 +861,8 @@ template <class ELFT> void EhFrameHeader<ELFT>::writeTo(uint8_t *Buf) {
template <class ELFT>
void EhFrameHeader<ELFT>::assignEhFrame(EHOutputSection<ELFT> *Sec) {
- if (this->Sec && this->Sec != Sec)
- assert("multiple .eh_frame sections not supported for .eh_frame_hdr");
+ assert((!this->Sec || this->Sec == Sec) &&
+ "multiple .eh_frame sections not supported for .eh_frame_hdr");
Live = Config->EhFrameHdr;
this->Sec = Sec;
}
OpenPOWER on IntegriCloud