mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Incorrect alignment on typedef and local variable debug info.
This commit is contained in:
@@ -51,6 +51,7 @@
|
|||||||
- Designated initialization with ranges would not error on overflow by 1.
|
- Designated initialization with ranges would not error on overflow by 1.
|
||||||
- `io::read_fully` now handles unbounded streams properly.
|
- `io::read_fully` now handles unbounded streams properly.
|
||||||
- Crash when doing a type property lookup for const inline enums in some cases #2717.
|
- Crash when doing a type property lookup for const inline enums in some cases #2717.
|
||||||
|
- Incorrect alignment on typedef and local variable debug info.
|
||||||
|
|
||||||
### Stdlib changes
|
### Stdlib changes
|
||||||
- Add `ThreadPool` join function to wait for all threads to finish in the pool without destroying the threads.
|
- Add `ThreadPool` join function to wait for all threads to finish in the pool without destroying the threads.
|
||||||
|
|||||||
@@ -605,7 +605,7 @@ void llvm_emit_global_variable_init(GenContext *c, Decl *decl)
|
|||||||
decl_is_local(decl),
|
decl_is_local(decl),
|
||||||
LLVMDIBuilderCreateExpression(c->debug.builder, NULL, 0),
|
LLVMDIBuilderCreateExpression(c->debug.builder, NULL, 0),
|
||||||
NULL,
|
NULL,
|
||||||
decl->alignment);
|
decl->alignment * 8);
|
||||||
LLVMGlobalSetMetadata(llvm_get_ref(c, decl), 0, decl->var.backend_debug_ref);
|
LLVMGlobalSetMetadata(llvm_get_ref(c, decl), 0, decl->var.backend_debug_ref);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ void llvm_emit_debug_local_var(GenContext *c, Decl *decl)
|
|||||||
llvm_get_debug_type(c, decl->type),
|
llvm_get_debug_type(c, decl->type),
|
||||||
compiler.build.optlevel != OPTIMIZATION_NONE,
|
compiler.build.optlevel != OPTIMIZATION_NONE,
|
||||||
LLVMDIFlagZero,
|
LLVMDIFlagZero,
|
||||||
decl->alignment);
|
decl->alignment * 8);
|
||||||
decl->var.backend_debug_ref = var;
|
decl->var.backend_debug_ref = var;
|
||||||
|
|
||||||
ASSERT(!decl->is_value);
|
ASSERT(!decl->is_value);
|
||||||
@@ -548,7 +548,7 @@ static LLVMMetadataRef llvm_debug_typedef_type(GenContext *c, Type *type)
|
|||||||
llvm_get_debug_type(c, original_type),
|
llvm_get_debug_type(c, original_type),
|
||||||
decl->name, strlen(decl->name),
|
decl->name, strlen(decl->name),
|
||||||
c->debug.file.debug_file, row ? row : 1,
|
c->debug.file.debug_file, row ? row : 1,
|
||||||
c->debug.file.debug_file, type_abi_alignment(type));
|
c->debug.file.debug_file, type_abi_alignment(type) * 8);
|
||||||
if (type->backend_debug_type)
|
if (type->backend_debug_type)
|
||||||
{
|
{
|
||||||
LLVMMetadataReplaceAllUsesWith(type->backend_debug_type, real);
|
LLVMMetadataReplaceAllUsesWith(type->backend_debug_type, real);
|
||||||
|
|||||||
Reference in New Issue
Block a user