[lld-macho][nfc] Reduce nesting of code added in D130125
This commit is contained in:
parent
3096b85696
commit
ee61dc5f6c
|
@ -1680,17 +1680,17 @@ void ObjCImageInfoSection::finalizeContents() {
|
||||||
ImageInfo inputInfo = parseImageInfo(file);
|
ImageInfo inputInfo = parseImageInfo(file);
|
||||||
info.hasCategoryClassProperties &= inputInfo.hasCategoryClassProperties;
|
info.hasCategoryClassProperties &= inputInfo.hasCategoryClassProperties;
|
||||||
|
|
||||||
if (inputInfo.swiftVersion != 0) {
|
// swiftVersion 0 means no Swift is present, so no version checking required
|
||||||
if (info.swiftVersion != 0 &&
|
if (inputInfo.swiftVersion == 0)
|
||||||
info.swiftVersion != inputInfo.swiftVersion) {
|
continue;
|
||||||
error("Swift version mismatch: " + toString(firstFile) +
|
|
||||||
" has version " + swiftVersionString(info.swiftVersion) +
|
if (info.swiftVersion != 0 && info.swiftVersion != inputInfo.swiftVersion) {
|
||||||
" but " + toString(file) + " has version " +
|
error("Swift version mismatch: " + toString(firstFile) + " has version " +
|
||||||
swiftVersionString(inputInfo.swiftVersion));
|
swiftVersionString(info.swiftVersion) + " but " + toString(file) +
|
||||||
} else {
|
" has version " + swiftVersionString(inputInfo.swiftVersion));
|
||||||
info.swiftVersion = inputInfo.swiftVersion;
|
} else {
|
||||||
firstFile = file;
|
info.swiftVersion = inputInfo.swiftVersion;
|
||||||
}
|
firstFile = file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue