Mercurial > projects > ldc
changeset 512:0d286cd9fd08
Add interface comparison to EqualExp: just do pointer comparison.
Fixes run/b/bug_e2ir_1786_B,C.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Fri, 15 Aug 2008 22:41:47 +0200 |
parents | a0b0676e787d |
children | ce57106d2619 |
files | gen/toir.cpp |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/gen/toir.cpp Fri Aug 15 05:08:33 2008 +0200 +++ b/gen/toir.cpp Fri Aug 15 22:41:47 2008 +0200 @@ -1288,9 +1288,11 @@ 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; switch(op) {