forked from OSchip/llvm-project
[lld-macho][NFC] Drop unnecessary braces around simple if/for bodies
Minor cleanup Differential Revision: https://reviews.llvm.org/D98758
This commit is contained in:
parent
70af2924a7
commit
a170533632
|
@ -99,9 +99,8 @@ std::vector<ObjFile *> BitcodeCompiler::compile() {
|
|||
|
||||
std::vector<ObjFile *> ret;
|
||||
for (unsigned i = 0; i != maxTasks; ++i) {
|
||||
if (buf[i].empty()) {
|
||||
if (buf[i].empty())
|
||||
continue;
|
||||
}
|
||||
SmallString<261> filePath("/tmp/lto.tmp");
|
||||
uint32_t modTime = 0;
|
||||
if (!config->ltoObjPath.empty()) {
|
||||
|
|
|
@ -45,9 +45,8 @@ void MergedOutputSection::finalize() {
|
|||
}
|
||||
|
||||
void MergedOutputSection::writeTo(uint8_t *buf) const {
|
||||
for (InputSection *isec : inputs) {
|
||||
for (InputSection *isec : inputs)
|
||||
isec->writeTo(buf + isec->outSecFileOff);
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: this is most likely wrong; reconsider how section flags
|
||||
|
|
|
@ -38,9 +38,8 @@ static uint32_t maxProt(StringRef name) {
|
|||
|
||||
size_t OutputSegment::numNonHiddenSections() const {
|
||||
size_t count = 0;
|
||||
for (const OutputSection *osec : sections) {
|
||||
for (const OutputSection *osec : sections)
|
||||
count += (!osec->isHidden() ? 1 : 0);
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
|
|
|
@ -54,11 +54,10 @@ Defined *SymbolTable::addDefined(StringRef name, InputFile *file,
|
|||
defined->privateExtern &= isPrivateExtern;
|
||||
return defined;
|
||||
}
|
||||
if (!defined->isWeakDef()) {
|
||||
if (!defined->isWeakDef())
|
||||
error("duplicate symbol: " + name + "\n>>> defined in " +
|
||||
toString(defined->getFile()) + "\n>>> defined in " +
|
||||
toString(file));
|
||||
}
|
||||
} else if (auto *dysym = dyn_cast<DylibSymbol>(s)) {
|
||||
overridesWeakDef = !isWeakDef && dysym->isWeakDef();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue