[cfe-commits] r88731 - in /cfe/trunk: include/clang/Frontend/CompilerInstance.h lib/Frontend/CompilerInstance.cpp

Daniel Dunbar daniel at zuster.org
Fri Nov 13 19:20:40 CST 2009


Author: ddunbar
Date: Fri Nov 13 19:20:40 2009
New Revision: 88731

URL: http://llvm.org/viewvc/llvm-project?rev=88731&view=rev
Log:
Move CompilerInstance::set* methods out-of-line.

Modified:
    cfe/trunk/include/clang/Frontend/CompilerInstance.h
    cfe/trunk/lib/Frontend/CompilerInstance.cpp

Modified: cfe/trunk/include/clang/Frontend/CompilerInstance.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/CompilerInstance.h?rev=88731&r1=88730&r2=88731&view=diff

==============================================================================
--- cfe/trunk/include/clang/Frontend/CompilerInstance.h (original)
+++ cfe/trunk/include/clang/Frontend/CompilerInstance.h Fri Nov 13 19:20:40 2009
@@ -204,9 +204,9 @@
 
   /// 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 @@
 
   /// 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 @@
 
   /// 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 @@
 
   /// 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 @@
 
   /// 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 @@
 
   /// 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 @@
 
   /// 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 @@
 
   /// 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

Modified: cfe/trunk/lib/Frontend/CompilerInstance.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInstance.cpp?rev=88731&r1=88730&r2=88731&view=diff

==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInstance.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInstance.cpp Fri Nov 13 19:20:40 2009
@@ -39,6 +39,38 @@
     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,




More information about the cfe-commits mailing list