diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-08-05 18:50:11 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-08-05 18:50:11 +0000 |
commit | 815c78fd9ab8bd5dfe8e8a91b8c6a413e2b8c889 (patch) | |
tree | 547c2e5fd353b83e909ad60e9292bb3af8037ace /lib/CodeGen/CodeGenModule.h | |
parent | a11440b68a02d54cd9c4b54160b0e339e0f30754 (diff) |
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
Diffstat (limited to 'lib/CodeGen/CodeGenModule.h')
-rw-r--r-- | lib/CodeGen/CodeGenModule.h | 9 |
1 files changed, 7 insertions, 2 deletions
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; } |