Fix arrays and vector debug information.

This commit is contained in:
Christoffer Lerno
2021-05-10 22:16:54 +02:00
committed by Christoffer Lerno
parent 9b86b00834
commit c907b52cd1
2 changed files with 5 additions and 5 deletions

View File

@@ -56,7 +56,7 @@ void decl_set_external_name(Decl *decl)
}
scratch_buffer_clear();
scratch_buffer_append(decl->module->name->module);
scratch_buffer_append("::");
scratch_buffer_append(".");
scratch_buffer_append(decl->name ?: "anon");
TokenType type = TOKEN_INVALID_TOKEN;
const char *buffer = scratch_buffer_to_string();

View File

@@ -445,8 +445,8 @@ static LLVMMetadataRef llvm_debug_array_type(GenContext *c, Type *type)
}
LLVMMetadataRef real = LLVMDIBuilderCreateArrayType(
c->debug.builder,
type_size(type),
type_abi_alignment(current_type),
type_size(type) * 8,
type_abi_alignment(current_type) * 8,
llvm_get_debug_type(c, current_type),
ranges, vec_size(ranges));
@@ -502,8 +502,8 @@ static LLVMMetadataRef llvm_debug_vector_type(GenContext *c, Type *type)
}
return LLVMDIBuilderCreateVectorType(
c->debug.builder,
type_size(type),
type_abi_alignment(current_type),
type_size(type) * 8,
type_abi_alignment(current_type) * 8,
llvm_get_debug_type(c, current_type),
ranges, vec_size(ranges));
}