Fix handling of ICF_NOVOPS in ipa-modref
[official-gcc.git] / gcc / rust / util / rust-operators.h
blobe3d6205c780e7f6c0831d711d4e0bb3ac02f7101
1 // Copyright (C) 2020-2024 Free Software Foundation, Inc.
3 // This file is part of GCC.
5 // GCC is free software; you can redistribute it and/or modify it under
6 // the terms of the GNU General Public License as published by the Free
7 // Software Foundation; either version 3, or (at your option) any later
8 // version.
10 // GCC is distributed in the hope that it will be useful, but WITHOUT ANY
11 // WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 // for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with GCC; see the file COPYING3. If not see
17 // <http://www.gnu.org/licenses/>.
19 #ifndef RUST_OPERATOR_H
20 #define RUST_OPERATOR_H
22 enum class NegationOperator
24 NEGATE,
25 NOT
28 enum class ArithmeticOrLogicalOperator
30 ADD, // std::ops::Add
31 SUBTRACT, // std::ops::Sub
32 MULTIPLY, // std::ops::Mul
33 DIVIDE, // std::ops::Div
34 MODULUS, // std::ops::Rem
35 BITWISE_AND, // std::ops::BitAnd
36 BITWISE_OR, // std::ops::BitOr
37 BITWISE_XOR, // std::ops::BitXor
38 LEFT_SHIFT, // std::ops::Shl
39 RIGHT_SHIFT // std::ops::Shr
42 enum class ComparisonOperator
44 EQUAL, // std::cmp::PartialEq::eq
45 NOT_EQUAL, // std::cmp::PartialEq::ne
46 GREATER_THAN, // std::cmp::PartialEq::gt
47 LESS_THAN, // std::cmp::PartialEq::lt
48 GREATER_OR_EQUAL, // std::cmp::PartialEq::ge
49 LESS_OR_EQUAL // std::cmp::PartialEq::le
52 enum class LazyBooleanOperator
54 LOGICAL_OR,
55 LOGICAL_AND
58 enum class CompoundAssignmentOperator
60 ADD, // std::ops::AddAssign
61 SUBTRACT, // std::ops::SubAssign
62 MULTIPLY, // std::ops::MulAssign
63 DIVIDE, // std::ops::DivAssign
64 MODULUS, // std::ops::RemAssign
65 BITWISE_AND, // std::ops::BitAndAssign
66 BITWISE_OR, // std::ops::BitOrAssign
67 BITWISE_XOR, // std::ops::BitXorAssign
68 LEFT_SHIFT, // std::ops::ShlAssign
69 RIGHT_SHIFT // std::ops::ShrAssign
72 #endif // RUST_OPERATOR_H