From: Anders Carlsson Date: Sat, 13 Oct 2007 05:52:34 +0000 (+0000) Subject: Fix an incorrect assertion. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=23af9f21283427d3e9b66cdccb711e2006028c8e;p=clang Fix an incorrect assertion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42951 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/CodeGen/CGExprScalar.cpp b/CodeGen/CGExprScalar.cpp index 755fd56de6..97efa33fc5 100644 --- a/CodeGen/CGExprScalar.cpp +++ b/CodeGen/CGExprScalar.cpp @@ -419,8 +419,9 @@ Value *ScalarExprEmitter::VisitImplicitCastExpr(const ImplicitCastExpr *E) { llvm::Value *Ops[] = {Idx0, Idx0}; return Builder.CreateGEP(V, Ops, Ops+2, "arraydecay"); } else if (E->getType()->isReferenceType()) { - assert(cast(E->getType())->getReferenceeType() == - Op->getType() && "Incompatible types!"); + assert(cast(E->getType().getCanonicalType())-> + getReferenceeType() == + Op->getType().getCanonicalType() && "Incompatible types!"); return EmitLValue(Op).getAddress(); }