A new helper function to set various bits in the class when
a new virtual function is declared/instantiated. it is used
in couple of places.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90470 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index ea5e47a..e02849f 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -2822,15 +2822,8 @@
SourceRange(D.getDeclSpec().getVirtualSpecLoc()));
} else {
// Okay: Add virtual to the method.
- cast<CXXMethodDecl>(NewFD)->setVirtualAsWritten(true);
CXXRecordDecl *CurClass = cast<CXXRecordDecl>(DC);
- CurClass->setAggregate(false);
- CurClass->setPOD(false);
- CurClass->setEmpty(false);
- CurClass->setPolymorphic(true);
- CurClass->setHasTrivialConstructor(false);
- CurClass->setHasTrivialCopyConstructor(false);
- CurClass->setHasTrivialCopyAssignment(false);
+ CurClass->setMethodAsVirtual(NewFD);
}
}