1
2
3
4
5
6 #include <cmajor/codegen/Interface.hpp>
7 #include <cmajor/codegen/CodeGenerator.hpp>
8 #include <cmajor/ir/EmittingContext.hpp>
9
10 namespace cmajor { namespace codegen {
11
12 void GenerateCode(cmajor::codegen::EmittingContext& emittingContext, cmajor::binder::BoundCompileUnit& boundCompileUnit)
13 {
14 cmajor::ir::EmittingContext* baseEmittingContext = emittingContext.GetBaseEmittingContext();
15 cmajor::codegen::CodeGenerator codeGenerator(*baseEmittingContext);
16 cmajor::codegenbase::CodeGenerator* baseCodeGenerator = codeGenerator.GetBaseCodeGenerator();
17 baseCodeGenerator->GenerateCode(&boundCompileUnit);
18 }
19
20 } }