Currently this asserts on anything other than errors. In one workaround scenario, AMDGPU emits DiagnosticInfoUnsupported as a warning for functions that can't be correctly codegened, but should never be executed.