Skip to content

Commit 7ff52db

Browse files
yoneymeta-codesync[bot]
authored andcommitted
Remove redundant operator!= implementations
Summary: Remove `operator!=` implementations synthesized from `operator==` under C++20. Reviewed By: mpage Differential Revision: D116081154 fbshipit-source-id: 858ef1edb1ba065f95fb3acc8f94a702c4ab446b
1 parent f10742a commit 7ff52db

14 files changed

Lines changed: 0 additions & 43 deletions

File tree

cinderx/Common/slab.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,6 @@ class SlabIterator {
4646
return ptr_ == o.ptr_;
4747
}
4848

49-
bool operator!=(const SlabIterator& o) const {
50-
return !operator==(o);
51-
}
52-
5349
private:
5450
char* ptr_{nullptr};
5551
size_t increment_{0};

cinderx/Common/slab_arena.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ class SlabArenaIterator {
4141
}
4242

4343
bool operator==(const SlabArenaIterator& other) const = default;
44-
bool operator!=(const SlabArenaIterator& other) const = default;
4544

4645
T& operator*() {
4746
return *slab_iter_;

cinderx/Jit/bitvector.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,6 @@ bool BitVector::operator==(const BitVector& rhs) const {
9595
return std::equal(cs.begin(), cs.end(), rhs.chunks().begin());
9696
}
9797

98-
bool BitVector::operator!=(const BitVector& rhs) const {
99-
return !(*this == rhs);
100-
}
101-
10298
template <typename Op>
10399
BitVector BitVector::binaryOp(const BitVector& rhs, const Op& op) const {
104100
JIT_THROW_IF(

cinderx/Jit/bitvector.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ class BitVector {
3535
// analysis), we only support operations between two bit vectors with the same
3636
// width.
3737
bool operator==(const BitVector& rhs) const;
38-
bool operator!=(const BitVector& rhs) const;
3938
BitVector operator&(const BitVector& rhs) const;
4039
BitVector operator|(const BitVector& rhs) const;
4140
BitVector operator-(const BitVector& rhs) const;

cinderx/Jit/bytecode.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,6 @@ class BytecodeInstructionBlock {
158158
return bci_ == other.bci_;
159159
}
160160

161-
bool operator!=(const Iterator& other) const {
162-
return !(*this == other);
163-
}
164-
165161
private:
166162
BytecodeInstruction bci_;
167163
BCIndex end_idx_;

cinderx/Jit/codegen/arch/phy_location.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,6 @@ struct PhyLocationBase {
5151
constexpr bool operator==(const PhyLocationBase& rhs) const {
5252
return loc == rhs.loc;
5353
}
54-
55-
constexpr bool operator!=(const PhyLocationBase& rhs) const {
56-
return loc != rhs.loc;
57-
}
5854
};
5955

6056
} // namespace cinderx::jit::codegen

cinderx/Jit/debug_info.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ class DebugInfo {
104104
}
105105

106106
bool operator==(const LocNode& other) const = default;
107-
bool operator!=(const LocNode& other) const = default;
108107
};
109108

110109
static const uint16_t kNoCallerID = UINT16_MAX;

cinderx/Jit/hir/alias_class.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,6 @@ class AliasClass {
7070
bool operator==(AliasClass other) const {
7171
return bits_ == other.bits_;
7272
}
73-
bool operator!=(AliasClass other) const {
74-
return !operator==(other);
75-
}
7673

7774
bool operator<=(AliasClass other) const {
7875
return (bits_ & other.bits_) == bits_;

cinderx/Jit/hir/frame_state.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ struct ExecutionBlock {
2525
(stack_level == other.stack_level);
2626
}
2727

28-
bool operator!=(const ExecutionBlock& other) const {
29-
return !(*this == other);
30-
}
31-
3228
bool isTryBlock() const {
3329
return opcode == SETUP_FINALLY;
3430
}
@@ -61,7 +57,6 @@ struct FrameState {
6157
FrameState& operator=(const FrameState& other) = default;
6258

6359
bool operator==(const FrameState& other) const = default;
64-
bool operator!=(const FrameState& other) const = default;
6560

6661
// If the function is inlined into another function, the depth at which it
6762
// is inlined (nested function calls may be inlined). Starts at 1. If the

cinderx/Jit/hir/refcount_insertion.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,9 +278,6 @@ class StateMap {
278278
bool operator==(const StateMap& other) const {
279279
return map_ == other.map_;
280280
}
281-
bool operator!=(const StateMap& other) const {
282-
return !operator==(other);
283-
}
284281

285282
private:
286283
map_t map_;

0 commit comments

Comments
 (0)