| ... | @@ -1341,7 +1341,10 @@ pub const Object = struct { | ... | @@ -1341,7 +1341,10 @@ 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 and !ptr_info.flags.is_allowzero) { | 1344 | if (param_ty.zigTypeTag(zcu) != .optional and |
| | 1345 | !ptr_info.flags.is_allowzero and |
| | 1346 | ptr_info.flags.address_space == .generic) |
| | 1347 | { |
| 1345 | try attributes.addParamAttr(llvm_arg_i, .nonnull, &o.builder); | 1348 | try attributes.addParamAttr(llvm_arg_i, .nonnull, &o.builder); |
| 1346 | } | 1349 | } |
| 1347 | if (ptr_info.flags.is_const) { | 1350 | if (ptr_info.flags.is_const) { |
| ... | @@ -4358,7 +4361,10 @@ pub const Object = struct { | ... | @@ -4358,7 +4361,10 @@ pub const Object = struct { |
| 4358 | try attributes.addParamAttr(llvm_arg_i, .@"noalias", &o.builder); | 4361 | try attributes.addParamAttr(llvm_arg_i, .@"noalias", &o.builder); |
| 4359 | } | 4362 | } |
| 4360 | } | 4363 | } |
| 4361 | if (!param_ty.isPtrLikeOptional(zcu) and !ptr_info.flags.is_allowzero) { | 4364 | if (!param_ty.isPtrLikeOptional(zcu) and |
| | 4365 | !ptr_info.flags.is_allowzero and |
| | 4366 | ptr_info.flags.address_space == .generic) |
| | 4367 | { |
| 4362 | try attributes.addParamAttr(llvm_arg_i, .nonnull, &o.builder); | 4368 | try attributes.addParamAttr(llvm_arg_i, .nonnull, &o.builder); |
| 4363 | } | 4369 | } |
| 4364 | switch (fn_info.cc) { | 4370 | switch (fn_info.cc) { |
| ... | @@ -5410,7 +5416,10 @@ pub const FuncGen = struct { | ... | @@ -5410,7 +5416,10 @@ pub const FuncGen = struct { |
| 5410 | try attributes.addParamAttr(llvm_arg_i, .@"noalias", &o.builder); | 5416 | try attributes.addParamAttr(llvm_arg_i, .@"noalias", &o.builder); |
| 5411 | } | 5417 | } |
| 5412 | } | 5418 | } |
| 5413 | if (param_ty.zigTypeTag(zcu) != .optional and !ptr_info.flags.is_allowzero) { | 5419 | if (param_ty.zigTypeTag(zcu) != .optional and |
| | 5420 | !ptr_info.flags.is_allowzero and |
| | 5421 | ptr_info.flags.address_space == .generic) |
| | 5422 | { |
| 5414 | try attributes.addParamAttr(llvm_arg_i, .nonnull, &o.builder); | 5423 | try attributes.addParamAttr(llvm_arg_i, .nonnull, &o.builder); |
| 5415 | } | 5424 | } |
| 5416 | if (ptr_info.flags.is_const) { | 5425 | if (ptr_info.flags.is_const) { |