diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-09-28 21:55:22 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-09-28 21:55:22 +0000 |
commit | 2138664dd2cff39de52ff11ca35f653c20b2e4b0 (patch) | |
tree | 4b84b172996daa11a88ded32cb30fa2f73addd70 /lib/AST/Decl.cpp | |
parent | 4949927fd5f8632ecb1ecdfdac0d13f8357b1984 (diff) |
Teach FunctionDecl::setPure() to (indirectly) mark the Abstract bit in
CXXRecordDecl::DefinitionData, rather than having Sema mark the bit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114993 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Decl.cpp')
-rw-r--r-- | lib/AST/Decl.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp index 2f3c006867..081e5ee6ad 100644 --- a/lib/AST/Decl.cpp +++ b/lib/AST/Decl.cpp @@ -966,6 +966,13 @@ void FunctionDecl::setBody(Stmt *B) { EndRangeLoc = B->getLocEnd(); } +void FunctionDecl::setPure(bool P) { + IsPure = P; + if (P) + if (CXXRecordDecl *Parent = dyn_cast<CXXRecordDecl>(getDeclContext())) + Parent->markedVirtualFunctionPure(); +} + bool FunctionDecl::isMain() const { ASTContext &Context = getASTContext(); return !Context.getLangOptions().Freestanding && |