| ... | @@ -1341,7 +1341,7 @@ pub const Object = struct { | ... | @@ -1341,7 +1341,7 @@ pub const Object = struct { |
| 1341 | try attributes.addParamAttr(llvm_arg_i, .@"noalias", &o.builder); | 1341 | try attributes.addParamAttr(llvm_arg_i, .@"noalias", &o.builder); |
| 1342 | } | 1342 | } |
| 1343 | } | 1343 | } |
| 1344 | if (param_ty.zigTypeTag(zcu) != .optional) { | 1344 | if (param_ty.zigTypeTag(zcu) != .optional and !ptr_info.flags.is_allowzero) { |
| 1345 | try attributes.addParamAttr(llvm_arg_i, .nonnull, &o.builder); | 1345 | try attributes.addParamAttr(llvm_arg_i, .nonnull, &o.builder); |
| 1346 | } | 1346 | } |
| 1347 | if (ptr_info.flags.is_const) { | 1347 | if (ptr_info.flags.is_const) { |
| ... | @@ -5410,7 +5410,7 @@ pub const FuncGen = struct { | ... | @@ -5410,7 +5410,7 @@ pub const FuncGen = struct { |
| 5410 | try attributes.addParamAttr(llvm_arg_i, .@"noalias", &o.builder); | 5410 | try attributes.addParamAttr(llvm_arg_i, .@"noalias", &o.builder); |
| 5411 | } | 5411 | } |
| 5412 | } | 5412 | } |
| 5413 | if (param_ty.zigTypeTag(zcu) != .optional) { | 5413 | if (param_ty.zigTypeTag(zcu) != .optional and !ptr_info.flags.is_allowzero) { |
| 5414 | try attributes.addParamAttr(llvm_arg_i, .nonnull, &o.builder); | 5414 | try attributes.addParamAttr(llvm_arg_i, .nonnull, &o.builder); |
| 5415 | } | 5415 | } |
| 5416 | if (ptr_info.flags.is_const) { | 5416 | if (ptr_info.flags.is_const) { |