]> granicus.if.org Git - clang/commitdiff
Be sure to instantiate rtti for non-polymorphic bases.
authorMike Stump <mrs@apple.com>
Fri, 4 Dec 2009 20:55:13 +0000 (20:55 +0000)
committerMike Stump <mrs@apple.com>
Fri, 4 Dec 2009 20:55:13 +0000 (20:55 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90586 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGRTTI.cpp

index f43920c13f1907d1a27f267795ed7923e67cd5ba..248fe89271c1697b93936b64bab5c91e196f7bf8 100644 (file)
@@ -231,7 +231,10 @@ public:
              e = RD->bases_end(); i != e; ++i) {
         const CXXRecordDecl *Base =
           cast<CXXRecordDecl>(i->getType()->getAs<RecordType>()->getDecl());
-        info.push_back(CGM.GenerateRTTIRef(Base));
+        if (Base->isPolymorphic())
+          info.push_back(CGM.GenerateRTTIRef(Base));
+        else
+          info.push_back(CGM.GenerateRTTI(Base));
         if (simple)
           break;
         int64_t offset;