diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-11-13 08:21:10 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-11-13 08:21:10 +0000 |
commit | 0f800391ffbfe3820e1c60246a09a97e5f065179 (patch) | |
tree | 3720c2f1b8868c1b62dd3f61c39794e1a28dbaa8 /include/clang/Frontend/CompilerInstance.h | |
parent | 704e48ae75111072eecaa20a365dff46fb49d2be (diff) |
Add CompilerInstance::createPCHExternalASTSource.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87097 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Frontend/CompilerInstance.h')
-rw-r--r-- | include/clang/Frontend/CompilerInstance.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/include/clang/Frontend/CompilerInstance.h b/include/clang/Frontend/CompilerInstance.h index 8c638206b6..2e19822fa0 100644 --- a/include/clang/Frontend/CompilerInstance.h +++ b/include/clang/Frontend/CompilerInstance.h @@ -11,6 +11,7 @@ #define LLVM_CLANG_FRONTEND_COMPILERINSTANCE_H_ #include "clang/Frontend/CompilerInvocation.h" +#include "llvm/ADT/StringRef.h" #include "llvm/ADT/OwningPtr.h" #include <cassert> @@ -22,8 +23,10 @@ namespace clang { class ASTContext; class Diagnostic; class DiagnosticClient; -class Preprocessor; +class ExternalASTSource; class FileManager; +class Preprocessor; +class Source; class SourceManager; class TargetInfo; @@ -349,6 +352,17 @@ public: /// Create the AST context. void createASTContext(); + /// Create an external AST source to read a PCH file and attach it to the AST + /// context. + void createPCHExternalASTSource(llvm::StringRef Path); + + /// Create an external AST source to read a PCH file. + /// + /// \return - The new object on success, or null on failure. + static ExternalASTSource * + createPCHExternalASTSource(llvm::StringRef Path, const std::string &Sysroot, + Preprocessor &PP, ASTContext &Context); + /// } }; |