diff options
| author | realazthat <realazthat@gmail.com> | 2016-02-05 16:29:26 -0500 |
|---|---|---|
| committer | realazthat <realazthat@gmail.com> | 2016-02-05 16:29:26 -0500 |
| commit | 54fbe7560ec0f3a9d5016f2058b07463767bf6e1 (patch) | |
| tree | 5c76ac86048834ec9dca4144dc4e651c51b01c03 /src/codegen.cpp | |
| parent | ff5673ae1b74b8ad59ee23921e0bb4e25349d10f (diff) | |
| download | zig-54fbe7560ec0f3a9d5016f2058b07463767bf6e1.tar.gz zig-54fbe7560ec0f3a9d5016f2058b07463767bf6e1.zip | |
Added code for generating nonnull attributes
Diffstat (limited to 'src/codegen.cpp')
| -rw-r--r-- | src/codegen.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp index f4defb8405..2965c8e593 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -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 |
