mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-03-01 18:13:18 +01:00
Store bools as i8.
I really hope we can refactor this to use a less leaky abstraction later – it should at least be possible to merge voidToI8 and i1ToI8.
This commit is contained in:
@@ -172,7 +172,7 @@ void VarDeclaration::codegen(Ir* p)
|
||||
// this->ir.irGlobal->value!), and in case we also do an initializer
|
||||
// with a different type later, swap it out and replace any existing
|
||||
// uses with bitcasts to the previous type.
|
||||
llvm::GlobalVariable* gvar = createGlobal(DtoType(type), isLLConst,
|
||||
llvm::GlobalVariable* gvar = createGlobal(i1ToI8(DtoType(type)), isLLConst,
|
||||
llLinkage, llName, isThreadlocal());
|
||||
this->ir.irGlobal->value = gvar;
|
||||
|
||||
@@ -206,7 +206,7 @@ void VarDeclaration::codegen(Ir* p)
|
||||
ir.irGlobal->constInit = initVal;
|
||||
gvar->setInitializer(initVal);
|
||||
|
||||
// Also set up the debug info.
|
||||
// Also set up the edbug info.
|
||||
DtoDwarfGlobalVariable(gvar, this);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user