From bef468fbfdcb1ba911ed037a670076826eeac3d3 Mon Sep 17 00:00:00 2001 From: peter klausler Date: Mon, 5 Aug 2019 12:47:43 -0700 Subject: [PATCH] [flang] Remove obsolete code Original-commit: flang-compiler/f18@81a97453a82e2b9773ee02eb43d78fac7c4ede52 Reviewed-on: https://github.com/flang-compiler/f18/pull/623 --- flang/lib/evaluate/fold.cc | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/flang/lib/evaluate/fold.cc b/flang/lib/evaluate/fold.cc index 13f7a59..2278195 100644 --- a/flang/lib/evaluate/fold.cc +++ b/flang/lib/evaluate/fold.cc @@ -545,30 +545,6 @@ Expr FoldOperation(FoldingContext &context, FunctionRef &&funcRef) { return Expr{std::move(funcRef)}; } -// TODO pmk rm -template -Expr SIGN( - FoldingContext &context, const Scalar &to, const Scalar &from) { - bool isNegative{false}; - if constexpr (FROM::category == TypeCategory::Integer) { - isNegative = from.IsNegative(); - } else { - static_assert(FROM::category == TypeCategory::Real); - isNegative = from.IsSignBitSet(); - } - if constexpr (TO::category == TypeCategory::Integer) { - auto result{to.SIGN(isNegative)}; - if (result.overflow) { - context.messages().Say( - "SIGN() folding overflows integer(kind=%d)"_en_US, TO::kind); - } - return Expr{Constant{std::move(result.value)}}; - } else { - static_assert(TO::category == TypeCategory::Real); - return Expr{Constant{to.SIGN(isNegative)}}; - } -} - template Expr> FoldIntrinsicFunction( FoldingContext &context, -- 2.7.4