diff options
author | Yizhe <yizhe@pku.edu.cn> | 2021-02-26 07:42:39 +0000 |
---|---|---|
committer | Philip Herron <herron.philip@googlemail.com> | 2021-03-01 10:42:27 +0000 |
commit | f0b7bd41383ace6e68c3527ca02cacad1583c63b (patch) | |
tree | 0de263aaf1f3a15ab6b1c5c27031aa36bd398699 /gcc/rust/rust-gcc.cc | |
parent | c8af0988598c9cee1204f8eef111e3e89beae14d (diff) | |
download | gcc-f0b7bd41383ace6e68c3527ca02cacad1583c63b.zip gcc-f0b7bd41383ace6e68c3527ca02cacad1583c63b.tar.gz gcc-f0b7bd41383ace6e68c3527ca02cacad1583c63b.tar.bz2 |
Fix typo
Diffstat (limited to 'gcc/rust/rust-gcc.cc')
-rw-r--r-- | gcc/rust/rust-gcc.cc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/gcc/rust/rust-gcc.cc b/gcc/rust/rust-gcc.cc index 8bdd1b3..a19ddae 100644 --- a/gcc/rust/rust-gcc.cc +++ b/gcc/rust/rust-gcc.cc @@ -300,7 +300,7 @@ public: Bexpression *left, Bexpression *right, Location); - Bexpression *comparision_expression (ComparisionOperator op, + Bexpression *comparison_expression (ComparisonOperator op, Bexpression *left, Bexpression *right, Location); @@ -1689,21 +1689,21 @@ operator_to_tree_code (ArithmeticOrLogicalOperator op, bool floating_point) } static enum tree_code -operator_to_tree_code (ComparisionOperator op) +operator_to_tree_code (ComparisonOperator op) { switch (op) { - case ComparisionOperator::EQUAL: + case ComparisonOperator::EQUAL: return EQ_EXPR; - case ComparisionOperator::NOT_EQUAL: + case ComparisonOperator::NOT_EQUAL: return NE_EXPR; - case ComparisionOperator::GREATER_THAN: + case ComparisonOperator::GREATER_THAN: return GT_EXPR; - case ComparisionOperator::LESS_THAN: + case ComparisonOperator::LESS_THAN: return LT_EXPR; - case ComparisionOperator::GREATER_OR_EQUAL: + case ComparisonOperator::GREATER_OR_EQUAL: return GE_EXPR; - case ComparisionOperator::LESS_OR_EQUAL: + case ComparisonOperator::LESS_OR_EQUAL: return LE_EXPR; default: gcc_unreachable (); @@ -1809,9 +1809,9 @@ Gcc_backend::arithmetic_or_logical_expression (ArithmeticOrLogicalOperator op, return this->make_expression (new_tree); } -// Return an expression for the comparision operation LEFT OP RIGHT. +// Return an expression for the comparison operation LEFT OP RIGHT. Bexpression * -Gcc_backend::comparision_expression (ComparisionOperator op, Bexpression *left, +Gcc_backend::comparison_expression (ComparisonOperator op, Bexpression *left, Bexpression *right, Location location) { /* Check if either expression is an error, in which case we return an error @@ -1821,7 +1821,7 @@ Gcc_backend::comparision_expression (ComparisionOperator op, Bexpression *left, if (left_tree == error_mark_node || right_tree == error_mark_node) return this->error_expression (); - /* For comparision operators, the resulting type should be boolean. */ + /* For comparison operators, the resulting type should be boolean. */ auto tree_type = boolean_type_node; auto tree_code = operator_to_tree_code (op); |