mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-14 03:43:13 +01:00
Use enum literal instead of constant
This commit is contained in:
@@ -290,7 +290,7 @@ llvm::DIType ldc::DIBuilder::CreateCompositeType(Type *type)
|
||||
|
||||
// if we don't know the aggregate's size, we don't know enough about it
|
||||
// to provide debug info. probably a forward-declared struct?
|
||||
if (sd->sizeok == 0)
|
||||
if (sd->sizeok == SIZEOKnone)
|
||||
#if LDC_LLVM_VER >= 304
|
||||
return DBuilder.createUnspecifiedType(sd->toChars());
|
||||
#else
|
||||
|
||||
@@ -536,7 +536,7 @@ void Module::genmoduleinfo()
|
||||
Logger::println("skipping interface '%s' in moduleinfo", cd->toPrettyChars());
|
||||
continue;
|
||||
}
|
||||
else if (cd->sizeok != 1)
|
||||
else if (cd->sizeok != SIZEOKdone)
|
||||
{
|
||||
Logger::println("skipping opaque class declaration '%s' in moduleinfo", cd->toPrettyChars());
|
||||
continue;
|
||||
|
||||
@@ -41,7 +41,7 @@ void DtoResolveStruct(StructDeclaration* sd)
|
||||
DtoType(sd->type);
|
||||
|
||||
// if it's a forward declaration, all bets are off. The type should be enough
|
||||
if (sd->sizeok != 1)
|
||||
if (sd->sizeok != SIZEOKdone)
|
||||
return;
|
||||
|
||||
// create the IrAggr
|
||||
|
||||
@@ -596,7 +596,7 @@ void TypeInfoStructDeclaration::llvmDefine()
|
||||
StructDeclaration *sd = tc->sym;
|
||||
|
||||
// can't emit typeinfo for forward declarations
|
||||
if (sd->sizeok != 1)
|
||||
if (sd->sizeok != SIZEOKdone)
|
||||
{
|
||||
sd->error("cannot emit TypeInfo for forward declaration");
|
||||
fatal();
|
||||
|
||||
@@ -88,7 +88,7 @@ IrTypeStruct* IrTypeStruct::get(StructDeclaration* sd)
|
||||
LOG_SCOPE;
|
||||
|
||||
// if it's a forward declaration, all bets are off, stick with the opaque
|
||||
if (sd->sizeok != 1)
|
||||
if (sd->sizeok != SIZEOKdone)
|
||||
return t;
|
||||
|
||||
// TODO:: Somehow merge this with IrAggr::createInitializerConstant, or
|
||||
|
||||
Reference in New Issue
Block a user