From: peter klausler Date: Wed, 13 Oct 2021 00:14:14 +0000 (-0700) Subject: [flang] Fix Windows build X-Git-Tag: upstream/15.0.7~28775 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=02410df530fbef5256711ec2220c4c34468c894c;p=platform%2Fupstream%2Fllvm.git [flang] Fix Windows build A recently added class constructor needs to be "explicit" to prevent it from being available for use as a conversion, which is breaking the MSVC build of flang. --- diff --git a/flang/include/flang/Common/uint128.h b/flang/include/flang/Common/uint128.h index 68098da..adbeeb3 100644 --- a/flang/include/flang/Common/uint128.h +++ b/flang/include/flang/Common/uint128.h @@ -47,16 +47,19 @@ public: constexpr Int128 &operator=(const Int128 &) = default; constexpr Int128 &operator=(Int128 &&) = default; - constexpr Int128(const Int128 &n) + explicit constexpr Int128(const Int128 &n) + : low_{n.low()}, high_{n.high()} {} + explicit constexpr Int128(Int128 &&n) : low_{n.low()}, high_{n.high()} {} - constexpr Int128(Int128 &&n) : low_{n.low()}, high_{n.high()} {} constexpr Int128 &operator=(const Int128 &n) { low_ = n.low(); high_ = n.high(); + return *this; } constexpr Int128 &operator=(Int128 &&n) { low_ = n.low(); high_ = n.high(); + return *this; } constexpr Int128 operator+() const { return *this; }