diff --git a/contrib/llvm-project/clang/lib/Basic/Targets/X86.h b/contrib/llvm-project/clang/lib/Basic/Targets/X86.h --- a/contrib/llvm-project/clang/lib/Basic/Targets/X86.h +++ b/contrib/llvm-project/clang/lib/Basic/Targets/X86.h @@ -223,12 +223,16 @@ virtual bool checkCFProtectionReturnSupported(DiagnosticsEngine &Diags) const override { - return true; + if (CPU == llvm::X86::CK_None || CPU >= llvm::X86::CK_PentiumPro) + return true; + return TargetInfo::checkCFProtectionReturnSupported(Diags); }; virtual bool checkCFProtectionBranchSupported(DiagnosticsEngine &Diags) const override { - return true; + if (CPU == llvm::X86::CK_None || CPU >= llvm::X86::CK_PentiumPro) + return true; + return TargetInfo::checkCFProtectionBranchSupported(Diags); }; virtual bool validateOperandSize(const llvm::StringMap &FeatureMap,