diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-11-14 01:20:40 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-11-14 01:20:40 +0000 |
commit | 8a9f569262860b8d03203327afd6047be2a9b5a6 (patch) | |
tree | d82813b1a5f606df2e1e5641bca26146ce9e964a | |
parent | 73099bfea9f5d4ec05265170bbefec3d76fb6b5e (diff) |
Move CompilerInstance::set* methods out-of-line.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88731 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/Frontend/CompilerInstance.h | 22 | ||||
-rw-r--r-- | lib/Frontend/CompilerInstance.cpp | 32 |
2 files changed, 41 insertions, 13 deletions
diff --git a/include/clang/Frontend/CompilerInstance.h b/include/clang/Frontend/CompilerInstance.h index b7b3e8c998..ee0c3c02f2 100644 --- a/include/clang/Frontend/CompilerInstance.h +++ b/include/clang/Frontend/CompilerInstance.h @@ -204,9 +204,9 @@ public: /// setDiagnostics - Replace the current diagnostics engine; the compiler /// instance takes ownership of \arg Value. - void setDiagnostics(Diagnostic *Value) { Diagnostics.reset(Value); } + void setDiagnostics(Diagnostic *Value); - DiagnosticClient &getDiagnosticClient() const { return *DiagClient; } + DiagnosticClient &getDiagnosticClient() const; /// takeDiagnosticClient - Remove the current diagnostics client and give /// ownership to the caller. @@ -214,9 +214,7 @@ public: /// setDiagnosticClient - Replace the current diagnostics client; the compiler /// instance takes ownership of \arg Value. - void setDiagnosticClient(DiagnosticClient *Value) { - DiagClient.reset(Value); - } + void setDiagnosticClient(DiagnosticClient *Value); /// } /// @name Target Info @@ -235,7 +233,7 @@ public: /// setTarget - Replace the current diagnostics engine; the compiler /// instance takes ownership of \arg Value. - void setTarget(TargetInfo *Value) { Target.reset(Value); } + void setTarget(TargetInfo *Value); /// } /// @name File Manager @@ -254,7 +252,7 @@ public: /// setFileManager - Replace the current file manager; the compiler instance /// takes ownership of \arg Value. - void setFileManager(FileManager *Value) { FileMgr.reset(Value); } + void setFileManager(FileManager *Value); /// } /// @name Source Manager @@ -273,7 +271,7 @@ public: /// setSourceManager - Replace the current source manager; the compiler /// instance takes ownership of \arg Value. - void setSourceManager(SourceManager *Value) { SourceMgr.reset(Value); } + void setSourceManager(SourceManager *Value); /// } /// @name Preprocessor @@ -292,7 +290,7 @@ public: /// setPreprocessor - Replace the current preprocessor; the compiler instance /// takes ownership of \arg Value. - void setPreprocessor(Preprocessor *Value) { PP.reset(Value); } + void setPreprocessor(Preprocessor *Value); /// } /// @name ASTContext @@ -311,7 +309,7 @@ public: /// setASTContext - Replace the current AST context; the compiler instance /// takes ownership of \arg Value. - void setASTContext(ASTContext *Value) { Context.reset(Value); } + void setASTContext(ASTContext *Value); /// } /// @name Code Completion @@ -333,9 +331,7 @@ public: /// setCodeCompletionConsumer - Replace the current code completion consumer; /// the compiler instance takes ownership of \arg Value. - void setCodeCompletionConsumer(CodeCompleteConsumer *Value) { - CompletionConsumer.reset(Value); - } + void setCodeCompletionConsumer(CodeCompleteConsumer *Value); /// } /// @name Output Files diff --git a/lib/Frontend/CompilerInstance.cpp b/lib/Frontend/CompilerInstance.cpp index af3733d892..2755a5a56d 100644 --- a/lib/Frontend/CompilerInstance.cpp +++ b/lib/Frontend/CompilerInstance.cpp @@ -39,6 +39,38 @@ CompilerInstance::~CompilerInstance() { delete LLVMContext; } +void CompilerInstance::setDiagnostics(Diagnostic *Value) { + Diagnostics.reset(Value); +} + +void CompilerInstance::setDiagnosticClient(DiagnosticClient *Value) { + DiagClient.reset(Value); +} + +void CompilerInstance::setTarget(TargetInfo *Value) { + Target.reset(Value); +} + +void CompilerInstance::setFileManager(FileManager *Value) { + FileMgr.reset(Value); +} + +void CompilerInstance::setSourceManager(SourceManager *Value) { + SourceMgr.reset(Value); +} + +void CompilerInstance::setPreprocessor(Preprocessor *Value) { + PP.reset(Value); +} + +void CompilerInstance::setASTContext(ASTContext *Value) { + Context.reset(Value); +} + +void CompilerInstance::setCodeCompletionConsumer(CodeCompleteConsumer *Value) { + CompletionConsumer.reset(Value); +} + // Diagnostics static void SetUpBuildDumpLog(const DiagnosticOptions &DiagOpts, |