Skip to content

Commit

Permalink
[mlir][llvm] Fix replaceImmediateSubElements on LLVMPointerType
Browse files Browse the repository at this point in the history
This method was assearting on opaque pointers because the element is
null.

Depends on D136498

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D136499
  • Loading branch information
Mogball committed Oct 21, 2022
1 parent a9bde16 commit 877977b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mlir/lib/Dialect/LLVMIR/IR/LLVMTypes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ void LLVMPointerType::walkImmediateSubElements(

Type LLVMPointerType::replaceImmediateSubElements(
ArrayRef<Attribute> replAttrs, ArrayRef<Type> replTypes) const {
return get(replTypes.front(), getAddressSpace());
return get(getContext(), replTypes.front(), getAddressSpace());
}

//===----------------------------------------------------------------------===//
Expand Down

0 comments on commit 877977b

Please sign in to comment.