llvm backend: use new srcloc

this allows to compile with ninja
This commit is contained in:
jacob gw
2021-03-19 08:51:09 -04:00
committed by Andrew Kelley
parent e9810d9e79
commit c50397c268
2 changed files with 24 additions and 16 deletions

View File

@@ -2337,11 +2337,14 @@ fn astgenAndSemaVarDecl(
};
defer gen_scope.instructions.deinit(mod.gpa);
const init_result_loc: astgen.ResultLoc = if (var_decl.ast.type_node != 0) .{
.ty = try astgen.expr(mod, &gen_scope.base, .{
.ty = @enumToInt(zir.Const.type_type),
}, var_decl.ast.type_node),
} else .none;
const init_result_loc: astgen.ResultLoc = if (var_decl.ast.type_node != 0)
.{
.ty = try astgen.expr(mod, &gen_scope.base, .{
.ty = @enumToInt(zir.Const.type_type),
}, var_decl.ast.type_node),
}
else
.none;
const init_inst = try astgen.comptimeExpr(
mod,