Skip to content
5 changes: 5 additions & 0 deletions mlir/lib/Conversion/UBToEmitC/UBToEmitC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ struct PoisonOpLowering : public OpConversionPattern<ub::PoisonOp> {
return success();
}

if (isa<emitc::OpaqueType>(convertedType)) {
return rewriter.notifyMatchFailure(op->getLoc(),
"cannot initialize opaque types.");
}

// Any constant will be fine to lower a poison op
if (emitc::isIntegerIndexOrOpaqueType(convertedType)) {
value = IntegerAttr::get((emitc::isPointerWideType(convertedType))
Expand Down
Loading