1
2
3
4
5
6 #include <cmajor/cmmid/Interface.hpp>
7 #include <cmajor/cmmid/BackEnd.hpp>
8
9 extern "C" cmajor::ir::EmittingContext* CmmCreateEmittingContext(int optimizationLevel)
10 {
11 return cmajor::mid::backEnd->CreateEmittingContext(optimizationLevel);
12 }
13
14 extern "C" void CmmDestroyEmittingContext(cmajor::ir::EmittingContext* emittingContext)
15 {
16 cmajor::mid::backEnd->DestroyEmittingContext(emittingContext);
17 }
18
19 extern "C" cmajor::ir::Emitter* CmmCreateEmitter(cmajor::ir::EmittingContext* emittingContext)
20 {
21 return cmajor::mid::backEnd->CreateEmitter(emittingContext);
22 }
23
24 extern "C" void CmmDestroyEmitter(cmajor::ir::Emitter* emitterHandle)
25 {
26 cmajor::mid::backEnd->DestroyEmitter(emitterHandle);
27 }
28
29 extern "C" cmajor::mid::BackEndKind GetBackEnd()
30 {
31 return cmajor::mid::backEnd->GetBackEndKind();
32 }