[llvm-commits] [lld] r172080 - /lld/trunk/lib/ReaderWriter/ELF/WriterELF.cpp
Shankar Easwaran
shankare at codeaurora.org
Thu Jan 10 10:16:10 PST 2013
Author: shankare
Date: Thu Jan 10 12:16:10 2013
New Revision: 172080
URL: http://llvm.org/viewvc/llvm-project?rev=172080&view=rev
Log:
style changes
Modified:
lld/trunk/lib/ReaderWriter/ELF/WriterELF.cpp
Modified: lld/trunk/lib/ReaderWriter/ELF/WriterELF.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/WriterELF.cpp?rev=172080&r1=172079&r2=172080&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/WriterELF.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/WriterELF.cpp Thu Jan 10 12:16:10 2013
@@ -1228,7 +1228,7 @@
, _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 @@
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);
More information about the llvm-commits
mailing list