Added code for generating nonnull attributes

This commit is contained in:
realazthat
2016-02-05 16:29:26 -05:00
parent ff5673ae1b
commit 54fbe7560e
3 changed files with 15 additions and 0 deletions

View File

@@ -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