art: fix -Wdefaulted-function-deleted warnings. am: bbd1e630dc
Original change: https://android-review.googlesource.com/c/platform/art/+/2176791
Change-Id: Ia1fa2cc2bccd6db28214794a561eecfed867ab0c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/compiler/optimizing/code_generator_arm_vixl.h b/compiler/optimizing/code_generator_arm_vixl.h
index 62a4d36..fc5fc48 100644
--- a/compiler/optimizing/code_generator_arm_vixl.h
+++ b/compiler/optimizing/code_generator_arm_vixl.h
@@ -602,7 +602,6 @@
struct PcRelativePatchInfo {
PcRelativePatchInfo(const DexFile* dex_file, uint32_t off_or_idx)
: target_dex_file(dex_file), offset_or_index(off_or_idx) { }
- PcRelativePatchInfo(PcRelativePatchInfo&& other) = default;
// Target dex file or null for .data.bmig.rel.ro patches.
const DexFile* target_dex_file;
diff --git a/openjdkjvmti/ti_redefine.cc b/openjdkjvmti/ti_redefine.cc
index 61a908b..59f93c5 100644
--- a/openjdkjvmti/ti_redefine.cc
+++ b/openjdkjvmti/ti_redefine.cc
@@ -1423,8 +1423,9 @@
RedefinitionDataIter(const RedefinitionDataIter&) = default;
RedefinitionDataIter(RedefinitionDataIter&&) = default;
- RedefinitionDataIter& operator=(const RedefinitionDataIter&) = default;
- RedefinitionDataIter& operator=(RedefinitionDataIter&&) = default;
+ // Assignments are deleted because holder_ is a reference.
+ RedefinitionDataIter& operator=(const RedefinitionDataIter&) = delete;
+ RedefinitionDataIter& operator=(RedefinitionDataIter&&) = delete;
bool operator==(const RedefinitionDataIter& other) const
REQUIRES_SHARED(art::Locks::mutator_lock_) {
diff --git a/runtime/gc/space/image_space.cc b/runtime/gc/space/image_space.cc
index 44b0613..41bb62f 100644
--- a/runtime/gc/space/image_space.cc
+++ b/runtime/gc/space/image_space.cc
@@ -200,7 +200,6 @@
// Helper class for relocating from one range of memory to another.
class RelocationRange {
public:
- RelocationRange() = default;
RelocationRange(const RelocationRange&) = default;
RelocationRange(uintptr_t source, uintptr_t dest, uintptr_t length)
: source_(source),
diff --git a/runtime/transaction.h b/runtime/transaction.h
index d147038..6fa8e58 100644
--- a/runtime/transaction.h
+++ b/runtime/transaction.h
@@ -245,15 +245,17 @@
REQUIRES(Locks::intern_table_lock_);
void VisitRoots(RootVisitor* visitor) REQUIRES_SHARED(Locks::mutator_lock_);
- InternStringLog() = default;
+ // Only the move constructor is supported.
+ InternStringLog() = delete;
+ InternStringLog(const InternStringLog& log) = delete;
+ InternStringLog& operator=(const InternStringLog& log) = delete;
InternStringLog(InternStringLog&& log) = default;
+ InternStringLog& operator=(InternStringLog&& log) = delete;
private:
mutable GcRoot<mirror::String> str_;
const StringKind string_kind_;
const StringOp string_op_;
-
- DISALLOW_COPY_AND_ASSIGN(InternStringLog);
};
class ResolveStringLog : public ValueObject {