diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-12-10 11:13:39 -0500 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-12-10 11:13:39 -0500 |
| commit | 9561e7c6b9fb2d9ebcbfd611196db698372ae7bd (patch) | |
| tree | 6b4fd0751e80a9c4128756d59d3c0bfecd230498 /src/codegen.cpp | |
| parent | cd4d638d10365e47bcb371119dcee22581355ac4 (diff) | |
| parent | 30715560c829d5636734edf7eabff3ee4d170e5d (diff) | |
| download | zig-9561e7c6b9fb2d9ebcbfd611196db698372ae7bd.tar.gz zig-9561e7c6b9fb2d9ebcbfd611196db698372ae7bd.zip | |
Merge branch 'Snektron-typeOf-to-TypeOf'
closes #3875
closes #1348
Diffstat (limited to 'src/codegen.cpp')
| -rw-r--r-- | src/codegen.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp index a7bf7a50c4..5b0899544d 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -1647,7 +1647,7 @@ static void gen_assign_raw(CodeGen *g, LLVMValueRef ptr, ZigType *ptr_type, ptr_type->data.pointer.vector_index, false); LLVMValueRef loaded_vector = gen_load(g, ptr, ptr_type, ""); LLVMValueRef new_vector = LLVMBuildInsertElement(g->builder, loaded_vector, value, - index_val, ""); + index_val, ""); gen_store(g, new_vector, ptr, ptr_type); return; } @@ -8067,7 +8067,7 @@ static void define_builtin_fns(CodeGen *g) { create_builtin_fn(g, BuiltinFnIdTypeInfo, "typeInfo", 1); create_builtin_fn(g, BuiltinFnIdType, "Type", 1); create_builtin_fn(g, BuiltinFnIdHasField, "hasField", 2); - create_builtin_fn(g, BuiltinFnIdTypeof, "typeOf", 1); // TODO rename to TypeOf + create_builtin_fn(g, BuiltinFnIdTypeof, "TypeOf", 1); create_builtin_fn(g, BuiltinFnIdAddWithOverflow, "addWithOverflow", 4); create_builtin_fn(g, BuiltinFnIdSubWithOverflow, "subWithOverflow", 4); create_builtin_fn(g, BuiltinFnIdMulWithOverflow, "mulWithOverflow", 4); @@ -8407,7 +8407,7 @@ Buf *codegen_generate_builtin_source(CodeGen *g) { break; } buf_appendf(contents, "pub const output_mode = OutputMode.%s;\n", out_type); - const char *link_type = g->is_dynamic ? "Dynamic" : "Static"; + const char *link_type = g->is_dynamic ? "Dynamic" : "Static"; buf_appendf(contents, "pub const link_mode = LinkMode.%s;\n", link_type); buf_appendf(contents, "pub const is_test = %s;\n", bool_to_str(g->is_test_build)); buf_appendf(contents, "pub const single_threaded = %s;\n", bool_to_str(g->is_single_threaded)); |
