summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
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
commit4ac39ef6f9ac3fcfdb77349bc74d4f350cbd3dc9 (patch)
tree1dfeebde585a358026bbb0ce4bad4dd46fc98d60 /clang/lib/CodeGen
parentee4cf81d9a036a6f5f122d71f416556f89301ba5 (diff)
downloadbcm5719-llvm-4ac39ef6f9ac3fcfdb77349bc74d4f350cbd3dc9.tar.gz
bcm5719-llvm-4ac39ef6f9ac3fcfdb77349bc74d4f350cbd3dc9.zip
Peer through refernces for typeid. WIP.
llvm-svn: 88871
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGCXXExpr.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGCXXExpr.cpp b/clang/lib/CodeGen/CGCXXExpr.cpp
index ccbb608553e..3fbd2b242ab 100644
--- a/clang/lib/CodeGen/CGCXXExpr.cpp
+++ b/clang/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())
OpenPOWER on IntegriCloud