[cfe-commits] r88871 - /cfe/trunk/lib/CodeGen/CGCXXExpr.cpp

Mike Stump mrs at apple.com
Sun Nov 15 12:30:40 PST 2009


Author: mrs
Date: Sun Nov 15 14:30:39 2009
New Revision: 88871

URL: http://llvm.org/viewvc/llvm-project?rev=88871&view=rev
Log:
Peer through refernces for typeid.  WIP.

Modified:
    cfe/trunk/lib/CodeGen/CGCXXExpr.cpp

Modified: cfe/trunk/lib/CodeGen/CGCXXExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCXXExpr.cpp?rev=88871&r1=88870&r2=88871&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGCXXExpr.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCXXExpr.cpp Sun Nov 15 14:30:39 2009
@@ -340,6 +340,8 @@
   const llvm::Type *LTy = ConvertType(Ty)->getPointerTo();
   if (E->isTypeOperand()) {
     QualType Ty = E->getTypeOperand();
+    CanQualType CanTy = CGM.getContext().getCanonicalType(Ty);
+    Ty = CanTy.getUnqualifiedType().getNonReferenceType();
     if (const RecordType *RT = Ty->getAs<RecordType>()) {
       const CXXRecordDecl *RD = cast<CXXRecordDecl>(RT->getDecl());
       if (RD->isPolymorphic())





More information about the cfe-commits mailing list