Use enum literal instead of constant

This commit is contained in:
Kai Nacke
2013-11-26 07:56:50 +01:00
parent a81a98cb30
commit 7f017608a8
5 changed files with 5 additions and 5 deletions

View File

@@ -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

View File

@@ -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;

View File

@@ -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

View File

@@ -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();

View File

@@ -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