Added code for generating nonnull attributes
This commit is contained in:
@@ -2905,6 +2905,10 @@ static void do_code_gen(CodeGen *g) {
|
||||
if (param_type->id == TypeTableEntryIdPointer) {
|
||||
// when https://github.com/andrewrk/zig/issues/82 is fixed, add
|
||||
// non null attribute here
|
||||
|
||||
///`i` is arg index + 1
|
||||
///I think that 0 is the return index, but it has a named LLVM constant variable
|
||||
LLVMZigAddNonNullAttr(fn_table_entry->fn_value, param_decl_i + 1);
|
||||
}
|
||||
if (is_byval) {
|
||||
// TODO
|
||||
|
||||
Reference in New Issue
Block a user