From 815c78fd9ab8bd5dfe8e8a91b8c6a413e2b8c889 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Tue, 5 Aug 2008 18:50:11 +0000 Subject: 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 --- lib/CodeGen/CodeGenModule.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'lib/CodeGen/CodeGenModule.h') diff --git a/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h index 1fb2cf7ae0..bb5de154fb 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 @@ class CodeGenModule { 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 @@ public: 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; } -- cgit v1.2.3-18-g5258