From 37c528259ae36ba14dbaeb10e3b174bd5ed993dd Mon Sep 17 00:00:00 2001 From: Shankar Easwaran Date: Thu, 10 Jan 2013 18:16:10 +0000 Subject: [PATCH] style changes llvm-svn: 172080 --- lld/lib/ReaderWriter/ELF/WriterELF.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lld/lib/ReaderWriter/ELF/WriterELF.cpp b/lld/lib/ReaderWriter/ELF/WriterELF.cpp index b4c3b54cc163..9a030f5d7228 100644 --- a/lld/lib/ReaderWriter/ELF/WriterELF.cpp +++ b/lld/lib/ReaderWriter/ELF/WriterELF.cpp @@ -1228,7 +1228,7 @@ public: , _flagsClear(flagsClear) {} - bool operator()(const Elf_Phdr* j) const { + bool operator()(const Elf_Phdr *j) const { return ((j->p_type == _type) && ((j->p_flags & _flags) == _flags) && (!(j->p_flags & _flagsClear))); @@ -2236,19 +2236,19 @@ void ELFExecutableWriter auto underScoreEndAtomIter = _layout->findAbsoluteAtom("_end"); auto endAtomIter = _layout->findAbsoluteAtom("end"); - if (bssStartAtomIter == abse || - bssEndAtomIter == abse || - underScoreEndAtomIter == abse || - endAtomIter == abse) - assert(0 && "Unable to find the absolute atoms that have been added by lld"); + assert(!(bssStartAtomIter == abse || + bssEndAtomIter == abse || + underScoreEndAtomIter == abse || + endAtomIter == abse) && + "Unable to find the absolute atoms that have been added by lld"); auto phe = _programHeader->findProgramHeader( llvm::ELF::PT_LOAD, llvm::ELF::PF_W, llvm::ELF::PF_X); - if (phe == _programHeader->end()) - assert(0 && "Can't find a data segment in the program header!"); + assert(!(phe == _programHeader->end()) && + "Can't find a data segment in the program header!"); bssStartAtomIter->setValue((*phe)->p_vaddr+(*phe)->p_filesz); bssEndAtomIter->setValue((*phe)->p_vaddr+(*phe)->p_memsz);