[Mlir-commits] [mlir] [MLIR] Add move constructor to BytecodeWriterConfig (PR #126130)
Karim Nosseir
llvmlistbot at llvm.org
Thu Feb 6 18:52:35 PST 2025
https://github.com/karimnosseir updated https://github.com/llvm/llvm-project/pull/126130
>From 0ceea68ef62c9bb1032cf63c11b6b0cc9138d1c7 Mon Sep 17 00:00:00 2001
From: Karim Nosir <karimnosseir at apple.com>
Date: Thu, 6 Feb 2025 12:38:35 -0800
Subject: [PATCH] [MLIR] Add move constructor to BytecodeWriterConfig
---
mlir/include/mlir/Bytecode/BytecodeWriter.h | 1 +
mlir/lib/Bytecode/Writer/BytecodeWriter.cpp | 3 +++
2 files changed, 4 insertions(+)
diff --git a/mlir/include/mlir/Bytecode/BytecodeWriter.h b/mlir/include/mlir/Bytecode/BytecodeWriter.h
index 0287e004bb99367..c6cff0bc813143e 100644
--- a/mlir/include/mlir/Bytecode/BytecodeWriter.h
+++ b/mlir/include/mlir/Bytecode/BytecodeWriter.h
@@ -82,6 +82,7 @@ class BytecodeWriterConfig {
/// printers for the fallback resources within the map.
BytecodeWriterConfig(FallbackAsmResourceMap &map,
StringRef producer = "MLIR" LLVM_VERSION_STRING);
+ BytecodeWriterConfig(BytecodeWriterConfig &&);
~BytecodeWriterConfig();
/// An internal implementation class that contains the state of the
diff --git a/mlir/lib/Bytecode/Writer/BytecodeWriter.cpp b/mlir/lib/Bytecode/Writer/BytecodeWriter.cpp
index 0e96aa97abeba6f..2b4697434717d2c 100644
--- a/mlir/lib/Bytecode/Writer/BytecodeWriter.cpp
+++ b/mlir/lib/Bytecode/Writer/BytecodeWriter.cpp
@@ -66,6 +66,9 @@ BytecodeWriterConfig::BytecodeWriterConfig(FallbackAsmResourceMap &map,
: BytecodeWriterConfig(producer) {
attachFallbackResourcePrinter(map);
}
+BytecodeWriterConfig::BytecodeWriterConfig(BytecodeWriterConfig &&config)
+ : impl(std::move(config.impl)) {}
+
BytecodeWriterConfig::~BytecodeWriterConfig() = default;
ArrayRef<std::unique_ptr<AttrTypeBytecodeWriter<Attribute>>>
More information about the Mlir-commits
mailing list