summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.h
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-08-05 18:50:11 +0000
committerTed Kremenek <kremenek@apple.com>2008-08-05 18:50:11 +0000
commit2c674f6dbb086a813b32cd66a8be49407ff4f576 (patch)
tree23daaff5e9b9d53f7f9b0685dfc4d8164af6ca80 /clang/lib/CodeGen/CodeGenModule.h
parent568bbf73b247cbebf0cb19ddf629610af3a3c86b (diff)
downloadbcm5719-llvm-2c674f6dbb086a813b32cd66a8be49407ff4f576.tar.gz
bcm5719-llvm-2c674f6dbb086a813b32cd66a8be49407ff4f576.zip
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.
llvm-svn: 54364
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h
index 1fb2cf7ae02..bb5de154fb1 100644
--- a/clang/lib/CodeGen/CodeGenModule.h
+++ b/clang/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; }
OpenPOWER on IntegriCloud