diff --git a/llvm/lib/ObjectYAML/MachOEmitter.cpp b/llvm/lib/ObjectYAML/MachOEmitter.cpp index e0885e0b206b..bda4aed885b4 100644 --- a/llvm/lib/ObjectYAML/MachOEmitter.cpp +++ b/llvm/lib/ObjectYAML/MachOEmitter.cpp @@ -494,7 +494,7 @@ void UniversalWriter::writeMachO(raw_ostream &OS) { writeFatArchs(OS); auto &FatFile = *ObjectFile.FatMachO; - assert(FatFile.FatArchs.size() > FatFile.Slices.size() && + assert(FatFile.FatArchs.size() >= FatFile.Slices.size() && "Cannot write Slices if not decribed in FatArches"); for (size_t i = 0; i < FatFile.Slices.size(); i++) { ZeroToOffset(OS, FatFile.FatArchs[i].offset);