# HG changeset patch # User Christian Kamm # Date 1222888460 -7200 # Node ID 9fcb5f1a4c54640e499eaa96fc3db4b0a6815324 # Parent 607b6b5819a79d10f06b981a2d448f797f3bf2ec# Parent bc83491463f04965194c659d6df33a86bc4716be Automated merge with http://hg.dsource.org/projects/llvmdc diff -r bc83491463f0 -r 9fcb5f1a4c54 gen/llvm.h --- a/gen/llvm.h Wed Oct 01 21:14:15 2008 +0200 +++ b/gen/llvm.h Wed Oct 01 21:14:20 2008 +0200 @@ -17,6 +17,9 @@ #include "llvm/Support/IRBuilder.h" using llvm::IRBuilder; +// for WriteTypeSymbolic +#include "llvm/Assembly/Writer.h" + #define GET_INTRINSIC_DECL(_X) (llvm::Intrinsic::getDeclaration(gIR->module, llvm::Intrinsic:: _X )) // shortcuts for the common llvm types diff -r bc83491463f0 -r 9fcb5f1a4c54 gen/toir.cpp --- a/gen/toir.cpp Wed Oct 01 21:14:15 2008 +0200 +++ b/gen/toir.cpp Wed Oct 01 21:14:20 2008 +0200 @@ -1954,7 +1954,7 @@ ? p->ir->CreateFCmpOEQ(l,r,"tmp") : p->ir->CreateFCmpONE(l,r,"tmp"); } - else if (t1->ty == Tpointer) + else if (t1->ty == Tpointer || t1->ty == Tclass) { if (l->getType() != r->getType()) { if (v->isNull()) @@ -1967,6 +1967,7 @@ : p->ir->CreateICmpNE(l,r,"tmp"); } else { + assert(l->getType() == r->getType()); eval = (op == TOKidentity) ? p->ir->CreateICmpEQ(l,r,"tmp") : p->ir->CreateICmpNE(l,r,"tmp");