diff --git a/llvm/include/llvm/TargetParser/AArch64TargetParser.h b/llvm/include/llvm/TargetParser/AArch64TargetParser.h index 348606964ea4b..3e800bdfc61f4 100644 --- a/llvm/include/llvm/TargetParser/AArch64TargetParser.h +++ b/llvm/include/llvm/TargetParser/AArch64TargetParser.h @@ -288,6 +288,8 @@ struct ArchInfo { return this->Version > Other.Version; } if (this->Version.getMajor() == 9 && Other.Version.getMajor() == 8) { + assert(this->Version.getMinor() && Other.Version.getMinor() && + "AArch64::ArchInfo should have a minor version."); return this->Version.getMinor().value_or(0) + 5 >= Other.Version.getMinor().value_or(0); }