1 //===-- lib/Common/Fortran.cpp --------------------------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #include "flang/Common/Fortran.h"
11 namespace Fortran::common
{
13 const char *AsFortran(NumericOperator opr
) {
15 SWITCH_COVERS_ALL_CASES
16 case NumericOperator::Power
:
18 case NumericOperator::Multiply
:
20 case NumericOperator::Divide
:
22 case NumericOperator::Add
:
24 case NumericOperator::Subtract
:
29 const char *AsFortran(LogicalOperator opr
) {
31 SWITCH_COVERS_ALL_CASES
32 case LogicalOperator::And
:
34 case LogicalOperator::Or
:
36 case LogicalOperator::Eqv
:
38 case LogicalOperator::Neqv
:
40 case LogicalOperator::Not
:
45 const char *AsFortran(RelationalOperator opr
) {
47 SWITCH_COVERS_ALL_CASES
48 case RelationalOperator::LT
:
50 case RelationalOperator::LE
:
52 case RelationalOperator::EQ
:
54 case RelationalOperator::NE
:
56 case RelationalOperator::GE
:
58 case RelationalOperator::GT
:
63 } // namespace Fortran::common