Skip to content

Commit 1842fe6

Browse files
committed
Add missing GVN =operator. NFCI.
Fixes PVS Studio warning that the 'ValueTable' class implements a copy constructor, but lacks the '=' operator.
1 parent 3ce0c78 commit 1842fe6

File tree

2 files changed

+2
-0
lines changed
  • llvm
    • include/llvm/Transforms/Scalar
    • lib/Transforms/Scalar

2 files changed

+2
-0
lines changed

llvm/include/llvm/Transforms/Scalar/GVN.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ class GVN : public PassInfoMixin<GVN> {
130130
ValueTable(const ValueTable &Arg);
131131
ValueTable(ValueTable &&Arg);
132132
~ValueTable();
133+
ValueTable &operator=(const ValueTable &Arg);
133134

134135
uint32_t lookupOrAdd(Value *V);
135136
uint32_t lookup(Value *V, bool Verify = true) const;

llvm/lib/Transforms/Scalar/GVN.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,7 @@ GVN::ValueTable::ValueTable() = default;
364364
GVN::ValueTable::ValueTable(const ValueTable &) = default;
365365
GVN::ValueTable::ValueTable(ValueTable &&) = default;
366366
GVN::ValueTable::~ValueTable() = default;
367+
GVN::ValueTable &GVN::ValueTable::operator=(const GVN::ValueTable &Arg) = default;
367368

368369
/// add - Insert a value into the table with a specified value number.
369370
void GVN::ValueTable::add(Value *V, uint32_t num) {

0 commit comments

Comments
 (0)