From d73c41aab66bfd24726214dbba098f02ee85296d Mon Sep 17 00:00:00 2001 From: Soren Lassen Date: Wed, 11 Dec 2024 13:30:14 -0800 Subject: [PATCH 1/2] fix checkResourceAttribute(*module) --- mlir/unittests/Bytecode/BytecodeTest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mlir/unittests/Bytecode/BytecodeTest.cpp b/mlir/unittests/Bytecode/BytecodeTest.cpp index baf5d5c650e30..47b323ab9bd7a 100644 --- a/mlir/unittests/Bytecode/BytecodeTest.cpp +++ b/mlir/unittests/Bytecode/BytecodeTest.cpp @@ -69,8 +69,8 @@ TEST(Bytecode, MultiModuleWithResource) { GTEST_SKIP(); // Try to see if we have a valid resource in the parsed module. - auto checkResourceAttribute = [&](Operation *op) { - Attribute attr = roundTripModule->getDiscardableAttr("bytecode.test"); + auto checkResourceAttribute = [](Operation *op) { + Attribute attr = op->getDiscardableAttr("bytecode.test"); ASSERT_TRUE(attr); auto denseResourceAttr = dyn_cast(attr); ASSERT_TRUE(denseResourceAttr); From 95e5467e28fabdc9614f48b4a5769cb12060ac21 Mon Sep 17 00:00:00 2001 From: Soren Lassen Date: Wed, 11 Dec 2024 13:48:26 -0800 Subject: [PATCH 2/2] rename checkResourceAttribute arg to parsedModule --- mlir/unittests/Bytecode/BytecodeTest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mlir/unittests/Bytecode/BytecodeTest.cpp b/mlir/unittests/Bytecode/BytecodeTest.cpp index 47b323ab9bd7a..cb915a092a0be 100644 --- a/mlir/unittests/Bytecode/BytecodeTest.cpp +++ b/mlir/unittests/Bytecode/BytecodeTest.cpp @@ -69,8 +69,8 @@ TEST(Bytecode, MultiModuleWithResource) { GTEST_SKIP(); // Try to see if we have a valid resource in the parsed module. - auto checkResourceAttribute = [](Operation *op) { - Attribute attr = op->getDiscardableAttr("bytecode.test"); + auto checkResourceAttribute = [](Operation *parsedModule) { + Attribute attr = parsedModule->getDiscardableAttr("bytecode.test"); ASSERT_TRUE(attr); auto denseResourceAttr = dyn_cast(attr); ASSERT_TRUE(denseResourceAttr);