[Mlir-commits] [mlir] [MLIR] modify BytecodeWriterConfig to return const refs for callbacks (PR #85926)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Mar 20 05:49:40 PDT 2024
https://github.com/0x00006000 created https://github.com/llvm/llvm-project/pull/85926
None
>From 17294ada0845ad59a19681553d9f70c56e0a2981 Mon Sep 17 00:00:00 2001
From: Matrix <alexsei at cock.pm>
Date: Wed, 20 Mar 2024 12:49:19 +0000
Subject: [PATCH] [MLIR] modify BytecodeWriterConfig to return const refs for
callbacks
---
mlir/lib/Bytecode/Writer/BytecodeWriter.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mlir/lib/Bytecode/Writer/BytecodeWriter.cpp b/mlir/lib/Bytecode/Writer/BytecodeWriter.cpp
index 9493a6c19a1067..33b25bf38a74d3 100644
--- a/mlir/lib/Bytecode/Writer/BytecodeWriter.cpp
+++ b/mlir/lib/Bytecode/Writer/BytecodeWriter.cpp
@@ -68,12 +68,12 @@ BytecodeWriterConfig::BytecodeWriterConfig(FallbackAsmResourceMap &map,
}
BytecodeWriterConfig::~BytecodeWriterConfig() = default;
-ArrayRef<std::unique_ptr<AttrTypeBytecodeWriter<Attribute>>>
+ArrayRef<const std::unique_ptr<AttrTypeBytecodeWriter<Attribute>> &>
BytecodeWriterConfig::getAttributeWriterCallbacks() const {
return impl->attributeWriterCallbacks;
}
-ArrayRef<std::unique_ptr<AttrTypeBytecodeWriter<Type>>>
+ArrayRef<const std::unique_ptr<AttrTypeBytecodeWriter<Type>> &>
BytecodeWriterConfig::getTypeWriterCallbacks() const {
return impl->typeWriterCallbacks;
}
More information about the Mlir-commits
mailing list