[ORC] Update examples to incorporate changes in ce2207abaf.

This should fix the builders that were failing due to broken JIT examples
after ce2207abaf.
This commit is contained in:
Lang Hames 2020-01-21 20:35:40 -08:00
parent debd2dcd09
commit 98e5547755
3 changed files with 5 additions and 3 deletions

View File

@ -45,7 +45,8 @@ public:
KaleidoscopeJIT(JITTargetMachineBuilder JTMB, DataLayout DL) KaleidoscopeJIT(JITTargetMachineBuilder JTMB, DataLayout DL)
: ObjectLayer(ES, : ObjectLayer(ES,
[]() { return std::make_unique<SectionMemoryManager>(); }), []() { return std::make_unique<SectionMemoryManager>(); }),
CompileLayer(ES, ObjectLayer, ConcurrentIRCompiler(std::move(JTMB))), CompileLayer(ES, ObjectLayer,
std::make_unique<ConcurrentIRCompiler>(std::move(JTMB))),
DL(std::move(DL)), Mangle(ES, this->DL), DL(std::move(DL)), Mangle(ES, this->DL),
Ctx(std::make_unique<LLVMContext>()), Ctx(std::make_unique<LLVMContext>()),
MainJD(ES.createJITDylib("<main>")) { MainJD(ES.createJITDylib("<main>")) {

View File

@ -51,7 +51,8 @@ public:
KaleidoscopeJIT(JITTargetMachineBuilder JTMB, DataLayout DL) KaleidoscopeJIT(JITTargetMachineBuilder JTMB, DataLayout DL)
: ObjectLayer(ES, : ObjectLayer(ES,
[]() { return std::make_unique<SectionMemoryManager>(); }), []() { return std::make_unique<SectionMemoryManager>(); }),
CompileLayer(ES, ObjectLayer, ConcurrentIRCompiler(std::move(JTMB))), CompileLayer(ES, ObjectLayer,
std::make_unique<ConcurrentIRCompiler>(std::move(JTMB))),
OptimizeLayer(ES, CompileLayer, optimizeModule), DL(std::move(DL)), OptimizeLayer(ES, CompileLayer, optimizeModule), DL(std::move(DL)),
Mangle(ES, this->DL), Ctx(std::make_unique<LLVMContext>()), Mangle(ES, this->DL), Ctx(std::make_unique<LLVMContext>()),
MainJD(ES.createJITDylib("<main>")) { MainJD(ES.createJITDylib("<main>")) {

View File

@ -104,7 +104,7 @@ private:
: ES(std::move(ES)), DL(std::move(DL)), : ES(std::move(ES)), DL(std::move(DL)),
MainJD(this->ES->createJITDylib("<main>")), LCTMgr(std::move(LCTMgr)), MainJD(this->ES->createJITDylib("<main>")), LCTMgr(std::move(LCTMgr)),
CompileLayer(*this->ES, ObjLayer, CompileLayer(*this->ES, ObjLayer,
ConcurrentIRCompiler(std::move(JTMB))), std::make_unique<ConcurrentIRCompiler>(std::move(JTMB))),
S(Imps, *this->ES), S(Imps, *this->ES),
SpeculateLayer(*this->ES, CompileLayer, S, Mangle, BlockFreqQuery()), SpeculateLayer(*this->ES, CompileLayer, S, Mangle, BlockFreqQuery()),
CODLayer(*this->ES, SpeculateLayer, *this->LCTMgr, CODLayer(*this->ES, SpeculateLayer, *this->LCTMgr,