Goose  Documentation

#ifndef EMPATHY_CODEGEN_MODULE_H
#define EMPATHY_CODEGEN_MODULE_H

namespace empathy::codegen
{
    class Module
    {
        public:
            Module( Env& env, const string& name );

            void DumpAsLlvmIr( const string& filename ) const;

            llvm::FunctionType* GetFuncType( const builtins::FuncType& ftype );

            llvm::Function* BuildFuncProto( const builtins::Func& func, const string& name );

            llvm::Function* GetFunc( const builtins::Func& func );
            llvm::Function* GetFunc( const builtins::Func& func, const string& name );

        private:
            llvm::Module m_llvmModule;
            llvm::IRBuilder<> m_llvmBuilder;
    };
}

#endif