Refactored driver logic for CodeGen into LLVMCodeGenWriter.  This ASTConsumer layers on top of LLVMCodeGen (another existing ASTConsumer) to emit bitcode files to disk.  This layering takes this logic out of clang.cpp and puts it directly into the ASTConsumer interface.  The benefit is that now --emit-llvm works with both serialized ASTs and regular source files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54364 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h
index 1fb2cf7..bb5de15 100644
--- a/lib/CodeGen/CodeGenModule.h
+++ b/lib/CodeGen/CodeGenModule.h
@@ -19,6 +19,7 @@
 #include "clang/AST/Attr.h"
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/StringMap.h"
+#include "llvm/ADT/OwningPtr.h"
 
 namespace llvm {
   class Module;
@@ -62,8 +63,8 @@
   const llvm::TargetData &TheTargetData;
   Diagnostic &Diags;
   CodeGenTypes Types;
-  CGObjCRuntime *Runtime;
-  CGDebugInfo *DebugInfo;
+  CGObjCRuntime* Runtime;
+  CGDebugInfo* DebugInfo;
 
   llvm::Function *MemCpyFn;
   llvm::Function *MemMoveFn;
@@ -103,8 +104,12 @@
   CodeGenModule(ASTContext &C, const LangOptions &Features, llvm::Module &M, 
                 const llvm::TargetData &TD, Diagnostic &Diags,
                 bool GenerateDebugInfo);
+
   ~CodeGenModule();
   
+  /// Release - Finalize LLVM code generation.
+  void Release();
+  
   CGObjCRuntime *getObjCRuntime() { return Runtime; }
   CGDebugInfo *getDebugInfo() { return DebugInfo; }
   ASTContext &getContext() const { return Context; }