I have a question about the intended use of the HasZeroInit
and CanBeGlobal
properties of target extension types. As implemented, they seem to apply only to the type itself:
@t = global target("spirv.Image") zeroinitializer
error: invalid type for null constant
but they do not apply to aggregates containing a target extension type:
@s = global {target("spirv.Image")} zeroinitializer
@a = global [1 x target("spirv.Image")] zeroinitializer
(no error)
Is this just an oversight? I think it would make more sense if HasZeroInit
and CanBeGlobal
applied to any aggregate containing the target extension type. I’d also like to add a new CanBeLocal
(or CanBeAlloca
) property controlling whether the type can be used in an alloca
instruction.