Don't insert class templates into the DynamicClasses vector.

llvm-svn: 124201
This commit is contained in:
Anders Carlsson
2011-01-25 18:08:22 +00:00
parent a518d5b3ac
commit e771e76326
2 changed files with 3 additions and 1 deletions

View File

@@ -290,6 +290,8 @@ void Sema::ActOnEndOfTranslationUnit() {
// this translation unit, then those vtables are considered "used" and must
// be emitted.
for (unsigned I = 0, N = DynamicClasses.size(); I != N; ++I) {
assert(!DynamicClasses[I]->isDependentType() &&
"Should not see dependent types here!");
if (const CXXMethodDecl *KeyFunction
= Context.getKeyFunction(DynamicClasses[I])) {
const FunctionDecl *Definition = 0;

View File

@@ -2746,7 +2746,7 @@ void Sema::CheckCompletedCXXClass(CXXRecordDecl *Record) {
}
}
if (Record->isDynamicClass())
if (Record->isDynamicClass() && !Record->isDependentType())
DynamicClasses.push_back(Record);
if (Record->getIdentifier()) {