[cfe-commits] r42951 - /cfe/trunk/CodeGen/CGExprScalar.cpp

Anders Carlsson andersca at mac.com
Fri Oct 12 22:52:35 PDT 2007


Author: andersca
Date: Sat Oct 13 00:52:34 2007
New Revision: 42951

URL: http://llvm.org/viewvc/llvm-project?rev=42951&view=rev
Log:
Fix an incorrect assertion.

Modified:
    cfe/trunk/CodeGen/CGExprScalar.cpp

Modified: cfe/trunk/CodeGen/CGExprScalar.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CodeGen/CGExprScalar.cpp?rev=42951&r1=42950&r2=42951&view=diff

==============================================================================
--- cfe/trunk/CodeGen/CGExprScalar.cpp (original)
+++ cfe/trunk/CodeGen/CGExprScalar.cpp Sat Oct 13 00:52:34 2007
@@ -419,8 +419,9 @@
     llvm::Value *Ops[] = {Idx0, Idx0};
     return Builder.CreateGEP(V, Ops, Ops+2, "arraydecay");
   } else if (E->getType()->isReferenceType()) {
-    assert(cast<ReferenceType>(E->getType())->getReferenceeType() == 
-           Op->getType() && "Incompatible types!");
+    assert(cast<ReferenceType>(E->getType().getCanonicalType())->
+           getReferenceeType() == 
+           Op->getType().getCanonicalType() && "Incompatible types!");
     
     return EmitLValue(Op).getAddress();
   }





More information about the cfe-commits mailing list