aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-05-26 16:21:03 -0400
committerAndrew Kelley <andrew@ziglang.org>2019-05-26 16:21:03 -0400
commit269a53b6afb052ec09f7b26db68219cfeaa0460e (patch)
tree6bb7bc0571670de5b09b736ac5f42172259ce576 /src/codegen.cpp
parent21ed9391179a9e472b25c80eaec5eebc9d08aca8 (diff)
downloadzig-269a53b6afb052ec09f7b26db68219cfeaa0460e.tar.gz
zig-269a53b6afb052ec09f7b26db68219cfeaa0460e.zip
introduce @hasDecl builtin function
closes #1439
Diffstat (limited to 'src/codegen.cpp')
-rw-r--r--src/codegen.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp
index 3a34894bb3..00a4338810 100644
--- a/src/codegen.cpp
+++ b/src/codegen.cpp
@@ -5616,6 +5616,7 @@ static LLVMValueRef ir_render_instruction(CodeGen *g, IrExecutable *executable,
case IrInstructionIdLoadPtr:
case IrInstructionIdBitCast:
case IrInstructionIdGlobalAsm:
+ case IrInstructionIdHasDecl:
zig_unreachable();
case IrInstructionIdDeclVarGen:
@@ -7409,6 +7410,7 @@ static void define_builtin_fns(CodeGen *g) {
create_builtin_fn(g, BuiltinFnIdToBytes, "sliceToBytes", 1);
create_builtin_fn(g, BuiltinFnIdFromBytes, "bytesToSlice", 2);
create_builtin_fn(g, BuiltinFnIdThis, "This", 0);
+ create_builtin_fn(g, BuiltinFnIdHasDecl, "hasDecl", 2);
}
static const char *bool_to_str(bool b) {