fix comptime function calls

This commit is contained in:
Andrew Kelley
2019-06-11 00:27:10 -04:00
parent 33371ab55c
commit 7411a88d5f
5 changed files with 33 additions and 30 deletions

View File

@@ -5709,34 +5709,6 @@ static LLVMValueRef ir_render_instruction(CodeGen *g, IrExecutable *executable,
zig_unreachable();
}
static bool scope_is_elided(Scope *scope) {
for (;;) {
switch (scope->id) {
case ScopeIdDecls:
case ScopeIdCompTime:
case ScopeIdCImport:
zig_unreachable();
case ScopeIdElide:
if (reinterpret_cast<ScopeElide *>(scope)->activated)
return true;
// fallthrough
case ScopeIdBlock:
case ScopeIdDefer:
case ScopeIdDeferExpr:
case ScopeIdVarDecl:
case ScopeIdLoop:
case ScopeIdSuspend:
case ScopeIdCoroPrelude:
case ScopeIdRuntime:
scope = scope->parent;
continue;
case ScopeIdFnDef:
return false;
}
zig_unreachable();
}
}
static void ir_render(CodeGen *g, ZigFn *fn_entry) {
assert(fn_entry);