[Mlir-commits] [mlir] af5d2df - [mlir] Fix asan leak in BlockAndValueMapping test
River Riddle
llvmlistbot at llvm.org
Fri Sep 9 15:10:39 PDT 2022
Author: River Riddle
Date: 2022-09-09T15:09:57-07:00
New Revision: af5d2df378eab3c52b6d4d39e3716477f0031cb5
URL: https://github.com/llvm/llvm-project/commit/af5d2df378eab3c52b6d4d39e3716477f0031cb5
DIFF: https://github.com/llvm/llvm-project/commit/af5d2df378eab3c52b6d4d39e3716477f0031cb5.diff
LOG: [mlir] Fix asan leak in BlockAndValueMapping test
Operations were being created without being erased.
Added:
Modified:
mlir/unittests/IR/BlockAndValueMapping.cpp
Removed:
################################################################################
diff --git a/mlir/unittests/IR/BlockAndValueMapping.cpp b/mlir/unittests/IR/BlockAndValueMapping.cpp
index dad3c915c5b96..ba66403eeac28 100644
--- a/mlir/unittests/IR/BlockAndValueMapping.cpp
+++ b/mlir/unittests/IR/BlockAndValueMapping.cpp
@@ -22,6 +22,9 @@ TEST(BlockAndValueMapping, TypedValue) {
OpBuilder builder(&context);
Location loc = builder.getUnknownLoc();
+ Block block;
+ builder.setInsertionPointToEnd(&block);
+
Value i64Val = builder.create<test::TestOpConstant>(
loc, builder.getI64Type(), builder.getI64IntegerAttr(0));
Value f64Val = builder.create<test::TestOpConstant>(
More information about the Mlir-commits
mailing list