Integrate numerous debug fixes from #1877

This commit is contained in:
gingerBill
2022-07-18 12:49:29 +01:00
parent 0b0c6da8b0
commit 6c7e5748a8
5 changed files with 49 additions and 35 deletions

View File

@@ -3068,17 +3068,6 @@ lbValue lb_build_expr_internal(lbProcedure *p, Ast *expr) {
return lb_const_value(p->module, type, tv.value);
}
#if 0
LLVMMetadataRef prev_debug_location = nullptr;
if (p->debug_info != nullptr) {
prev_debug_location = LLVMGetCurrentDebugLocation2(p->builder);
LLVMSetCurrentDebugLocation2(p->builder, lb_debug_location_from_ast(p, expr));
}
defer (if (prev_debug_location != nullptr) {
LLVMSetCurrentDebugLocation2(p->builder, prev_debug_location);
});
#endif
switch (expr->kind) {
case_ast_node(bl, BasicLit, expr);
TokenPos pos = bl->token.pos;