[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:50:37 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir

@llvm/pr-subscribers-mlir-core

Author: Matrix (0x00006000)

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/85926.diff


1 Files Affected:

- (modified) mlir/lib/Bytecode/Writer/BytecodeWriter.cpp (+2-2) 


``````````diff
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;
 }

``````````

</details>


https://github.com/llvm/llvm-project/pull/85926


More information about the Mlir-commits mailing list