diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2016-02-02 19:09:53 -0700 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2016-02-02 19:09:53 -0700 |
| commit | 8058b5e0a92e4eac05ba19aabed1fc041353c69b (patch) | |
| tree | 42b52618d9da5503dd4e7eb1702cf4d4be3a5a71 /src/codegen.cpp | |
| parent | 79adf55699a549841eba3eb07f1dbb19c4da9ed1 (diff) | |
| download | zig-8058b5e0a92e4eac05ba19aabed1fc041353c69b.tar.gz zig-8058b5e0a92e4eac05ba19aabed1fc041353c69b.zip | |
fix crash when incomplete struct used as argument
closes #107
Diffstat (limited to 'src/codegen.cpp')
| -rw-r--r-- | src/codegen.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp index c68632100a..abcfbd0965 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -2830,6 +2830,7 @@ static void do_code_gen(CodeGen *g) { arg_no = var->gen_arg_index + 1; var->is_ptr = false; + assert(var->gen_arg_index >= 0); var->value_ref = LLVMGetParam(fn, var->gen_arg_index); } else { tag = LLVMZigTag_DW_auto_variable(); |
