[Mlir-commits] [mlir] [mlir][BytecodeReader] Fix FusedLoc bytecode builder (PR #99632)
Jacques Pienaar
llvmlistbot at llvm.org
Sun Jul 21 08:40:14 PDT 2024
================
@@ -148,3 +149,24 @@ TEST(Bytecode, OpWithoutProperties) {
EXPECT_TRUE(OperationEquivalence::computeHash(op.get()) ==
OperationEquivalence::computeHash(roundtripped));
}
+
+TEST(Bytecode, FusedLocCrash) {
+ MLIRContext context;
+ OpBuilder builder(&context);
+ SmallVector<Location> locs;
+ FusedLoc fusedLoc = FusedLoc::get(&context, locs, {});
----------------
jpienaar wrote:
Should we disallow this at the constructor? It feels weird to have a fused location with no locations. I don't know when one would actually want this behavior to be valid.
https://github.com/llvm/llvm-project/pull/99632
More information about the Mlir-commits
mailing list