Skip to content

Commit 6c16e5f

Browse files
authored
fix(mlir): use ptr_type for sol.alloca alloc_type attribute (#340)
The `alloc_type` attribute on `sol.alloca` was set to `element_type`, but the TableGen custom builder uses the same type for both `alloc_type` and the result (`Sol_PtrType`). This sets it to `ptr_type` to match the ODS definition.
1 parent b708ac5 commit 6c16e5f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

solx-mlir/src/context/builder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,7 @@ impl<'context> Builder<'context> {
801801
block
802802
.append_operation(
803803
AllocaOperation::builder(self.context, self.unknown_location)
804-
.alloc_type(TypeAttribute::new(element_type))
804+
.alloc_type(TypeAttribute::new(ptr_type))
805805
.addr(ptr_type)
806806
.build()
807807
.into(),

0 commit comments

Comments
 (0)