Skip to content

Commit 7f01760

Browse files
committed
Use enum literal instead of constant
1 parent a81a98c commit 7f01760

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

gen/dibuilder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ llvm::DIType ldc::DIBuilder::CreateCompositeType(Type *type)
290290

291291
// if we don't know the aggregate's size, we don't know enough about it
292292
// to provide debug info. probably a forward-declared struct?
293-
if (sd->sizeok == 0)
293+
if (sd->sizeok == SIZEOKnone)
294294
#if LDC_LLVM_VER >= 304
295295
return DBuilder.createUnspecifiedType(sd->toChars());
296296
#else

gen/module.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ void Module::genmoduleinfo()
536536
Logger::println("skipping interface '%s' in moduleinfo", cd->toPrettyChars());
537537
continue;
538538
}
539-
else if (cd->sizeok != 1)
539+
else if (cd->sizeok != SIZEOKdone)
540540
{
541541
Logger::println("skipping opaque class declaration '%s' in moduleinfo", cd->toPrettyChars());
542542
continue;

gen/structs.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ void DtoResolveStruct(StructDeclaration* sd)
4141
DtoType(sd->type);
4242

4343
// if it's a forward declaration, all bets are off. The type should be enough
44-
if (sd->sizeok != 1)
44+
if (sd->sizeok != SIZEOKdone)
4545
return;
4646

4747
// create the IrAggr

gen/typinf.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ void TypeInfoStructDeclaration::llvmDefine()
596596
StructDeclaration *sd = tc->sym;
597597

598598
// can't emit typeinfo for forward declarations
599-
if (sd->sizeok != 1)
599+
if (sd->sizeok != SIZEOKdone)
600600
{
601601
sd->error("cannot emit TypeInfo for forward declaration");
602602
fatal();

ir/irtypestruct.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ IrTypeStruct* IrTypeStruct::get(StructDeclaration* sd)
8888
LOG_SCOPE;
8989

9090
// if it's a forward declaration, all bets are off, stick with the opaque
91-
if (sd->sizeok != 1)
91+
if (sd->sizeok != SIZEOKdone)
9292
return t;
9393

9494
// TODO:: Somehow merge this with IrAggr::createInitializerConstant, or

0 commit comments

Comments
 (0)