aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2017-03-16 16:02:35 -0400
committerAndrew Kelley <superjoe30@gmail.com>2017-03-16 16:02:35 -0400
commitaf536ac343564e5120f99cbf3b7fc9efa984eb93 (patch)
tree42a937bca75d34e2d3b4fc7d44ebafa66d8bd55b /src/codegen.cpp
parent329457bb4f714a8392153dfecfabd6f356144688 (diff)
downloadzig-af536ac343564e5120f99cbf3b7fc9efa984eb93.tar.gz
zig-af536ac343564e5120f99cbf3b7fc9efa984eb93.zip
introduce new test syntax
* remove setFnTest builtin * add test "name" { ... } syntax * remove --check-unused argument. functions are always lazy now.
Diffstat (limited to 'src/codegen.cpp')
-rw-r--r--src/codegen.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp
index fd2d8dd3a9..5456fbce3d 100644
--- a/src/codegen.cpp
+++ b/src/codegen.cpp
@@ -138,10 +138,6 @@ void codegen_set_verbose(CodeGen *g, bool verbose) {
g->verbose = verbose;
}
-void codegen_set_check_unused(CodeGen *g, bool check_unused) {
- g->check_unused = check_unused;
-}
-
void codegen_set_each_lib_rpath(CodeGen *g, bool each_lib_rpath) {
g->each_lib_rpath = each_lib_rpath;
}
@@ -323,7 +319,7 @@ static ZigLLVMDIScope *get_di_scope(CodeGen *g, Scope *scope) {
return get_di_scope(g, scope->parent);
unsigned line_number = fn_table_entry->proto_node->line + 1;
unsigned scope_line = line_number;
- bool is_definition = fn_table_entry->fn_def_node != nullptr;
+ bool is_definition = fn_table_entry->body_node != nullptr;
unsigned flags = 0;
bool is_optimized = g->is_release_build;
ZigLLVMDISubprogram *subprogram = ZigLLVMCreateFunction(g->dbuilder,
@@ -2492,7 +2488,6 @@ static LLVMValueRef ir_render_instruction(CodeGen *g, IrExecutable *executable,
case IrInstructionIdToPtrType:
case IrInstructionIdPtrTypeChild:
case IrInstructionIdFieldPtr:
- case IrInstructionIdSetFnTest:
case IrInstructionIdSetFnVisible:
case IrInstructionIdSetDebugSafety:
case IrInstructionIdArrayType:
@@ -4054,7 +4049,6 @@ static void define_builtin_fns(CodeGen *g) {
create_builtin_fn(g, BuiltinFnIdCompileLog, "compileLog", SIZE_MAX);
create_builtin_fn(g, BuiltinFnIdIntType, "intType", 2);
create_builtin_fn(g, BuiltinFnIdUnreachable, "unreachable", 0);
- create_builtin_fn(g, BuiltinFnIdSetFnTest, "setFnTest", 1);
create_builtin_fn(g, BuiltinFnIdSetFnVisible, "setFnVisible", 2);
create_builtin_fn(g, BuiltinFnIdSetDebugSafety, "setDebugSafety", 2);
create_builtin_fn(g, BuiltinFnIdAlloca, "alloca", 2);