[Mlir-commits] [mlir] e605969 - [MLIR] check resource attr of module in TEST(Bytecode, MultiModuleWithResource) (#119618)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Dec 12 15:04:36 PST 2024


Author: Soren Lassen
Date: 2024-12-13T00:04:33+01:00
New Revision: e605969efe95efd9941cf958d921006d0833889f

URL: https://github.com/llvm/llvm-project/commit/e605969efe95efd9941cf958d921006d0833889f
DIFF: https://github.com/llvm/llvm-project/commit/e605969efe95efd9941cf958d921006d0833889f.diff

LOG: [MLIR] check resource attr of module in TEST(Bytecode, MultiModuleWithResource) (#119618)

`checkResourceAttribute` accidentally ignored its argument and only
checked `roundTripModule` and not `module`

Added: 
    

Modified: 
    mlir/unittests/Bytecode/BytecodeTest.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/unittests/Bytecode/BytecodeTest.cpp b/mlir/unittests/Bytecode/BytecodeTest.cpp
index baf5d5c650e309..cb915a092a0be8 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 *parsedModule) {
+    Attribute attr = parsedModule->getDiscardableAttr("bytecode.test");
     ASSERT_TRUE(attr);
     auto denseResourceAttr = dyn_cast<DenseI32ResourceElementsAttr>(attr);
     ASSERT_TRUE(denseResourceAttr);


        


More information about the Mlir-commits mailing list