diff options
author | Chris Lattner <sabre@nondot.org> | 2008-02-06 02:01:47 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-02-06 02:01:47 +0000 |
commit | 8ee3c0340ff10f0d98e2e138813ada3b36239038 (patch) | |
tree | 4f216db1c8c10cd378cd9cb44fa16f1d342c8be8 /include/clang/CodeGen/ModuleBuilder.h | |
parent | e66b65c3a3377d487104f6adc071d054b0d9d343 (diff) |
move the codegen ASTConsumer out of the driver into libcodegen,
eliminating a bunch of forwarding methods and generally
simplifying things.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46792 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/CodeGen/ModuleBuilder.h')
-rw-r--r-- | include/clang/CodeGen/ModuleBuilder.h | 41 |
1 files changed, 5 insertions, 36 deletions
diff --git a/include/clang/CodeGen/ModuleBuilder.h b/include/clang/CodeGen/ModuleBuilder.h index ab08c4abc6..8abb377f80 100644 --- a/include/clang/CodeGen/ModuleBuilder.h +++ b/include/clang/CodeGen/ModuleBuilder.h @@ -16,46 +16,15 @@ namespace llvm { class Module; - class TargetData; } namespace clang { - class ASTContext; - class FunctionDecl; - class LinkageSpecDecl; - class FileVarDecl; - class TypeDecl; - struct LangOptions; class Diagnostic; - -namespace CodeGen { - class CodeGenModule; - - /// Init - Create an ModuleBuilder with the specified ASTContext. - CodeGenModule *Init(ASTContext &Context, const LangOptions &Features, - llvm::Module &M, const llvm::TargetData &TD, - Diagnostic &Diags); - - /// CodeGenFunction - Convert the AST node for a FunctionDecl into LLVM. - /// - void CodeGenFunction(CodeGenModule *Builder, FunctionDecl *D); - - void CodeGenLinkageSpec(CodeGenModule *Builder, LinkageSpecDecl *LS); - - /// CodeGenGlobalVar - Emit the specified global variable to LLVM. - void CodeGenGlobalVar(CodeGenModule *Builder, FileVarDecl *D); - - /// CodeGenTypeDecl - Compile a type. - void CodeGenTypeDecl(CodeGenModule *Builder, TypeDecl *D); - - /// PrintStats - Emit statistic information to stderr. - /// - void PrintStats(CodeGenModule *Builder); + struct LangOptions; + class ASTConsumer; - /// Terminate - Gracefully shut down the builder. - /// - void Terminate(CodeGenModule *Builder); -} // end namespace CodeGen -} // end namespace clang + ASTConsumer *CreateLLVMCodeGen(Diagnostic &Diags, const LangOptions &Features, + llvm::Module *&DestModule); +} #endif |