Revert "[mlir][ExecutionEngine] Fix missing return from operator==() in OwningMemRef" (#179999)
Reverts llvm/llvm-project#179655 Break https://lab.llvm.org/buildbot/#/builders/169/builds/19630 https://lab.llvm.org/buildbot/#/builders/24/builds/17229
This commit is contained in:
@@ -186,12 +186,11 @@ public:
|
||||
}
|
||||
OwningMemRef(const OwningMemRef &) = delete;
|
||||
OwningMemRef &operator=(const OwningMemRef &) = delete;
|
||||
OwningMemRef &operator=(OwningMemRef &&other) {
|
||||
OwningMemRef &operator=(const OwningMemRef &&other) {
|
||||
freeFunc = other.freeFunc;
|
||||
descriptor = other.descriptor;
|
||||
other.freeFunc = nullptr;
|
||||
memset(&other.descriptor, 0, sizeof(other.descriptor));
|
||||
return *this;
|
||||
}
|
||||
OwningMemRef(OwningMemRef &&other) { *this = std::move(other); }
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@ add_mlir_unittest(MLIRExecutionEngineTests
|
||||
DynamicMemRef.cpp
|
||||
StridedMemRef.cpp
|
||||
Invoke.cpp
|
||||
OwningMemRef.cpp
|
||||
)
|
||||
|
||||
mlir_target_link_libraries(MLIRExecutionEngineTests
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
//===- StridedMemRef.cpp ----------------------------------------*- C++ -*-===//
|
||||
//
|
||||
// This file is licensed under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "mlir/ExecutionEngine/MemRefUtils.h"
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
|
||||
using namespace ::mlir;
|
||||
using namespace ::testing;
|
||||
|
||||
TEST(OwningMemRef, assignOverloadChaining) {
|
||||
int64_t mem1Shape[] = {3};
|
||||
int64_t mem2Shape[] = {4};
|
||||
|
||||
OwningMemRef<float, 1> mem1(mem1Shape);
|
||||
OwningMemRef<float, 1> mem2(mem2Shape);
|
||||
OwningMemRef<float, 1> &ref = (mem1 = std::move(mem2));
|
||||
|
||||
EXPECT_EQ(&ref, &mem1);
|
||||
}
|
||||
Reference in New Issue
Block a user