Skip to content

Commit 1b58e77

Browse files
committed
[mlir] Check variable for null before dereferencing in Dialect/SPIRV/IR
1 parent 6c0f7a5 commit 1b58e77

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mlir/lib/Dialect/SPIRV/IR/SPIRVOps.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -727,9 +727,9 @@ void mlir::spirv::ConstantOp::getAsmResultNames(
727727
return setNameFn(getResult(), (intCst.getInt() ? "true" : "false"));
728728
}
729729

730-
if (intTy.isSignless()) {
730+
if (intTy && intTy.isSignless()) {
731731
specialName << intCst.getInt();
732-
} else if (intTy.isUnsigned()) {
732+
} else if (intTy && intTy.isUnsigned()) {
733733
specialName << intCst.getUInt();
734734
} else {
735735
specialName << intCst.getSInt();

0 commit comments

Comments
 (0)