Skip to content
This repository was archived by the owner on Jun 20, 2019. It is now read-only.

Commit 495ced0

Browse files
committed
Remove IN_GCC code for xopCmp/xopEquals in compiler and library
1 parent 2b7241c commit 495ced0

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

gcc/d/dfrontend/clone.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -652,11 +652,7 @@ FuncDeclaration *buildXopCmp(StructDeclaration *sd, Scope *sc)
652652
fop->generated = true;
653653
Expression *e1 = new IdentifierExp(loc, Id::p);
654654
Expression *e2 = new IdentifierExp(loc, Id::q);
655-
#ifdef IN_GCC
656-
Expression *e = new CallExp(loc, new DotIdExp(loc, e1, Id::cmp), e2);
657-
#else
658655
Expression *e = new CallExp(loc, new DotIdExp(loc, e2, Id::cmp), e1);
659-
#endif
660656

661657
fop->fbody = new ReturnStatement(loc, e);
662658

libphobos/libdruntime/object.d

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1127,12 +1127,7 @@ class TypeInfo_Struct : TypeInfo
11271127
return false;
11281128
else if (xopEquals)
11291129
{
1130-
version(GNU)
1131-
{ // BUG: GDC and DMD use different calling conventions
1132-
return (*xopEquals)(p2, p1);
1133-
}
1134-
else
1135-
return (*xopEquals)(p1, p2);
1130+
return (*xopEquals)(p1, p2);
11361131
}
11371132
else if (p1 == p2)
11381133
return true;
@@ -1154,12 +1149,7 @@ class TypeInfo_Struct : TypeInfo
11541149
return true;
11551150
else if (xopCmp)
11561151
{
1157-
version(GNU)
1158-
{ // BUG: GDC and DMD use different calling conventions
1159-
return (*xopCmp)(p1, p2);
1160-
}
1161-
else
1162-
return (*xopCmp)(p2, p1);
1152+
return (*xopCmp)(p2, p1);
11631153
}
11641154
else
11651155
// BUG: relies on the GC not moving objects

0 commit comments

Comments
 (0)