From: Douglas Gregor Date: Mon, 5 Apr 2010 18:20:14 +0000 (+0000) Subject: Make the ASTUnit constructor private; all ASTUnit clients should be using the static... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8b96253907c47141af0b7b2a44a368748d006a87;p=clang Make the ASTUnit constructor private; all ASTUnit clients should be using the static factory functions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100444 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Frontend/ASTUnit.h b/include/clang/Frontend/ASTUnit.h index 247df7c1dd..573a3f2723 100644 --- a/include/clang/Frontend/ASTUnit.h +++ b/include/clang/Frontend/ASTUnit.h @@ -52,7 +52,6 @@ public: typedef std::map > PreprocessedEntitiesByFileMap; private: - llvm::OwningPtr DiagEngine; llvm::OwningPtr FileMgr; llvm::OwningPtr SourceMgr; llvm::OwningPtr HeaderInfo; @@ -117,6 +116,8 @@ private: ASTUnit(const ASTUnit&); // DO NOT IMPLEMENT ASTUnit &operator=(const ASTUnit &); // DO NOT IMPLEMENT + ASTUnit(Diagnostic &Diag, bool MainFileIsAST); + public: class ConcurrencyCheck { volatile ASTUnit &Self; @@ -136,7 +137,6 @@ public: }; friend class ConcurrencyCheck; - ASTUnit(Diagnostic &Diag, bool MainFileIsAST); ~ASTUnit(); bool isMainFileAST() const { return MainFileIsAST; }