mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-08-24 15:20:05 +02:00
Add interface comparison to EqualExp: just do pointer comparison.
Fixes run/b/bug_e2ir_1786_B,C.
This commit is contained in:
@@ -1288,9 +1288,11 @@ DValue* EqualExp::toElem(IRState* p)
|
|||||||
|
|
||||||
LLValue* eval = 0;
|
LLValue* eval = 0;
|
||||||
|
|
||||||
if (t->isintegral() || t->ty == Tpointer)
|
// the Tclass catches interface comparisons, regular
|
||||||
|
// class equality should be rewritten as a.opEquals(b) by this time
|
||||||
|
if (t->isintegral() || t->ty == Tpointer || t->ty == Tclass)
|
||||||
{
|
{
|
||||||
Logger::println("integral or pointer");
|
Logger::println("integral or pointer or interface");
|
||||||
llvm::ICmpInst::Predicate cmpop;
|
llvm::ICmpInst::Predicate cmpop;
|
||||||
switch(op)
|
switch(op)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user