llvm-error.patch 1.4 KB

12345678910111213141516171819202122232425262728293031323334
  1. diff --git a/thirdparty/clipper2/include/clipper2/clipper.core.h b/thirdparty/clipper2/include/clipper2/clipper.core.h
  2. index 67dd731af6..0f69bf2d9f 100644
  3. --- a/thirdparty/clipper2/include/clipper2/clipper.core.h
  4. +++ b/thirdparty/clipper2/include/clipper2/clipper.core.h
  5. @@ -695,11 +695,13 @@ namespace Clipper2Lib
  6. // returns true if (and only if) a * b == c * d
  7. inline bool ProductsAreEqual(int64_t a, int64_t b, int64_t c, int64_t d)
  8. {
  9. -#if (defined(__clang__) || defined(__GNUC__)) && UINTPTR_MAX >= UINT64_MAX
  10. - const auto ab = static_cast<__int128_t>(a) * static_cast<__int128_t>(b);
  11. - const auto cd = static_cast<__int128_t>(c) * static_cast<__int128_t>(d);
  12. - return ab == cd;
  13. -#else
  14. +// -- GODOT start --
  15. +// #if (defined(__clang__) || defined(__GNUC__)) && UINTPTR_MAX >= UINT64_MAX
  16. +// const auto ab = static_cast<__int128_t>(a) * static_cast<__int128_t>(b);
  17. +// const auto cd = static_cast<__int128_t>(c) * static_cast<__int128_t>(d);
  18. +// return ab == cd;
  19. +// #else
  20. +// -- GODOT end --
  21. // nb: unsigned values needed for calculating overflow carry
  22. const auto abs_a = static_cast<uint64_t>(std::abs(a));
  23. const auto abs_b = static_cast<uint64_t>(std::abs(b));
  24. @@ -714,7 +716,9 @@ namespace Clipper2Lib
  25. const auto sign_cd = TriSign(c) * TriSign(d);
  26. return abs_ab == abs_cd && sign_ab == sign_cd;
  27. -#endif
  28. +// -- GODOT start --
  29. +// #endif
  30. +// -- GODOT end --
  31. }
  32. template <typename T>