From 65170ec4d0f4a9186eeccff73f64fc6caebd26c5 Mon Sep 17 00:00:00 2001 From: Allan Shortlidge Date: Wed, 26 Mar 2025 13:53:21 -0700 Subject: [PATCH] Suppress warnings for Swift C++ interop by hiding an operator declaration. Solves the same kind of issue as https://github.com/swiftlang/llvm-project/pull/9590. --- llvm/include/llvm/Analysis/ScalarEvolution.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/llvm/include/llvm/Analysis/ScalarEvolution.h b/llvm/include/llvm/Analysis/ScalarEvolution.h index df23c70e25514..73941009de720 100644 --- a/llvm/include/llvm/Analysis/ScalarEvolution.h +++ b/llvm/include/llvm/Analysis/ScalarEvolution.h @@ -1383,9 +1383,11 @@ class ScalarEvolution { reinterpret_cast(Ty))); } +#ifndef __swift__ bool operator==(const FoldID &RHS) const { return std::tie(Op, Ty, C) == std::tie(RHS.Op, RHS.Ty, RHS.C); } +#endif }; private: @@ -2446,10 +2448,12 @@ template <> struct DenseMapInfo { return Val.computeHash(); } +#ifndef __swift__ static bool isEqual(const ScalarEvolution::FoldID &LHS, const ScalarEvolution::FoldID &RHS) { return LHS == RHS; } +#endif }; } // end namespace llvm