aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Stump <mrs@apple.com>2009-11-15 20:30:39 +0000
committerMike Stump <mrs@apple.com>2009-11-15 20:30:39 +0000
commit80556320e7e22692060f793a7d30aa6630bdd96a (patch)
tree4f49b210a85fc35abe88abea80782bdd652893bc
parent1f126bd18c85ea129c3897f8729cebb090917d01 (diff)
Peer through refernces for typeid. WIP.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88871 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/CGCXXExpr.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/CGCXXExpr.cpp b/lib/CodeGen/CGCXXExpr.cpp
index ccbb608553..3fbd2b242a 100644
--- a/lib/CodeGen/CGCXXExpr.cpp
+++ b/lib/CodeGen/CGCXXExpr.cpp
@@ -340,6 +340,8 @@ llvm::Value * CodeGenFunction::EmitCXXTypeidExpr(const CXXTypeidExpr *E) {
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())