00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 #ifndef COMMA_CODEGEN_GENERATOR_HDR_GUARD
00010 #define COMMA_CODEGEN_GENERATOR_HDR_GUARD
00011 
00012 #include "llvm/Module.h"
00013 #include "llvm/Target/TargetData.h"
00014 
00015 namespace comma {
00016 
00017 class Generator {
00018 
00019 public:
00020     virtual ~Generator() { }
00021 
00023     static Generator *create(llvm::Module *M,
00024                              const llvm::TargetData &data,
00025                              AstResource &resource);
00026 
00028     virtual void emitToplevelDecl(Decl *decl) = 0;
00029 
00042     virtual void emitEntry(ProcedureDecl *decl) = 0;
00043 
00044 protected:
00045     
00046     Generator() { }
00047 
00048 private:
00049     Generator(const Generator &CG);             
00050     Generator &operator =(const Generator &CG); 
00051 };
00052 
00053 } 
00054 
00055 #endif