summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
Diffstat (limited to 'clang')
-rw-r--r--clang/include/clang/Frontend/CompilerInstance.h22
-rw-r--r--clang/lib/Frontend/CompilerInstance.cpp32
2 files changed, 41 insertions, 13 deletions
diff --git a/clang/include/clang/Frontend/CompilerInstance.h b/clang/include/clang/Frontend/CompilerInstance.h
index b7b3e8c9981..ee0c3c02f20 100644
--- a/clang/include/clang/Frontend/CompilerInstance.h
+++ b/clang/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/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index af3733d892b..2755a5a56d9 100644
--- a/clang/lib/Frontend/CompilerInstance.cpp
+++ b/clang/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,
OpenPOWER on IntegriCloud