diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2016-02-03 02:21:28 -0700 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2016-02-03 02:21:28 -0700 |
| commit | f2fe231ddf6ad6f7e46190e6a47996d7996b7b76 (patch) | |
| tree | e442f1a33c96baf385a63b82c781b6b79401b4ef /src/codegen.cpp | |
| parent | b28f7d080886ab8347d96899b907e8111fd15e2b (diff) | |
| download | zig-f2fe231ddf6ad6f7e46190e6a47996d7996b7b76.tar.gz zig-f2fe231ddf6ad6f7e46190e6a47996d7996b7b76.zip | |
add @compile_var("is_release")
Diffstat (limited to 'src/codegen.cpp')
| -rw-r--r-- | src/codegen.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp index 49e9c8b91a..2d080f9d1c 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -1353,6 +1353,8 @@ static LLVMValueRef gen_struct_memcpy(CodeGen *g, AstNode *source_node, LLVMValu TypeTableEntry *isize = g->builtin_types.entry_isize; uint64_t size_bytes = LLVMStoreSizeOfType(g->target_data_ref, type_entry->type_ref); uint64_t align_bytes = get_memcpy_align(g, type_entry); + assert(size_bytes > 0); + assert(align_bytes > 0); LLVMValueRef params[] = { dest_ptr, // dest pointer |
