diff options
author | Lang Hames <lhames@gmail.com> | 2018-04-02 20:57:56 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2018-04-02 20:57:56 +0000 |
commit | 73bcd8b27c50620d2cb5c23a4de65f75e6a6db4b (patch) | |
tree | 0b95599ac5062e289af5d7b147986e367aff9226 /examples | |
parent | dd9d04ad20e56a20066058a01191f973ab10ec27 (diff) |
[ORC] Create a new SymbolStringPool by default in ExecutionSession constructor.
This makes the common case of constructing an ExecutionSession tidier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329013 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'examples')
6 files changed, 6 insertions, 17 deletions
diff --git a/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h b/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h index a7eb1db8625..902f5f0403a 100644 --- a/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h +++ b/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h @@ -38,7 +38,6 @@ namespace orc { class KaleidoscopeJIT { private: - SymbolStringPool SSP; ExecutionSession ES; std::shared_ptr<SymbolResolver> Resolver; std::unique_ptr<TargetMachine> TM; @@ -48,8 +47,7 @@ private: public: KaleidoscopeJIT() - : ES(SSP), - Resolver(createLegacyLookupResolver( + : Resolver(createLegacyLookupResolver( [this](const std::string &Name) -> JITSymbol { if (auto Sym = CompileLayer.findSymbol(Name, false)) return Sym; diff --git a/examples/Kaleidoscope/BuildingAJIT/Chapter2/KaleidoscopeJIT.h b/examples/Kaleidoscope/BuildingAJIT/Chapter2/KaleidoscopeJIT.h index 679d72e2050..653e2fd302b 100644 --- a/examples/Kaleidoscope/BuildingAJIT/Chapter2/KaleidoscopeJIT.h +++ b/examples/Kaleidoscope/BuildingAJIT/Chapter2/KaleidoscopeJIT.h @@ -42,7 +42,6 @@ namespace orc { class KaleidoscopeJIT { private: - SymbolStringPool SSP; ExecutionSession ES; std::shared_ptr<SymbolResolver> Resolver; std::unique_ptr<TargetMachine> TM; @@ -57,8 +56,7 @@ private: public: KaleidoscopeJIT() - : ES(SSP), - Resolver(createLegacyLookupResolver( + : Resolver(createLegacyLookupResolver( [this](const std::string &Name) -> JITSymbol { if (auto Sym = OptimizeLayer.findSymbol(Name, false)) return Sym; diff --git a/examples/Kaleidoscope/BuildingAJIT/Chapter3/KaleidoscopeJIT.h b/examples/Kaleidoscope/BuildingAJIT/Chapter3/KaleidoscopeJIT.h index cca82293018..fa306c61789 100644 --- a/examples/Kaleidoscope/BuildingAJIT/Chapter3/KaleidoscopeJIT.h +++ b/examples/Kaleidoscope/BuildingAJIT/Chapter3/KaleidoscopeJIT.h @@ -46,7 +46,6 @@ namespace orc { class KaleidoscopeJIT { private: - SymbolStringPool SSP; ExecutionSession ES; std::map<VModuleKey, std::shared_ptr<SymbolResolver>> Resolvers; std::unique_ptr<TargetMachine> TM; @@ -64,7 +63,7 @@ private: public: KaleidoscopeJIT() - : ES(SSP), TM(EngineBuilder().selectTarget()), DL(TM->createDataLayout()), + : TM(EngineBuilder().selectTarget()), DL(TM->createDataLayout()), ObjectLayer(ES, [this](VModuleKey K) { return RTDyldObjectLinkingLayer::Resources{ diff --git a/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h b/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h index 6378dd61e29..c4ddc5094c4 100644 --- a/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h +++ b/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h @@ -72,7 +72,6 @@ namespace orc { class KaleidoscopeJIT { private: - SymbolStringPool SSP; ExecutionSession ES; std::shared_ptr<SymbolResolver> Resolver; std::unique_ptr<TargetMachine> TM; @@ -90,8 +89,7 @@ private: public: KaleidoscopeJIT() - : ES(SSP), - Resolver(createLegacyLookupResolver( + : Resolver(createLegacyLookupResolver( [this](const std::string &Name) -> JITSymbol { if (auto Sym = IndirectStubsMgr->findStub(Name, false)) return Sym; diff --git a/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h b/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h index acb4090b5eb..d41cce717d4 100644 --- a/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h +++ b/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h @@ -77,7 +77,6 @@ using MyRemote = remote::OrcRemoteTargetClient; class KaleidoscopeJIT { private: - SymbolStringPool SSP; ExecutionSession ES; std::shared_ptr<SymbolResolver> Resolver; std::unique_ptr<TargetMachine> TM; @@ -96,8 +95,7 @@ private: public: KaleidoscopeJIT(MyRemote &Remote) - : ES(SSP), - Resolver(createLegacyLookupResolver( + : Resolver(createLegacyLookupResolver( [this](const std::string &Name) -> JITSymbol { if (auto Sym = IndirectStubsMgr->findStub(Name, false)) return Sym; diff --git a/examples/Kaleidoscope/include/KaleidoscopeJIT.h b/examples/Kaleidoscope/include/KaleidoscopeJIT.h index 3e2fe42a5d8..79d39515625 100644 --- a/examples/Kaleidoscope/include/KaleidoscopeJIT.h +++ b/examples/Kaleidoscope/include/KaleidoscopeJIT.h @@ -44,8 +44,7 @@ public: using CompileLayerT = IRCompileLayer<ObjLayerT, SimpleCompiler>; KaleidoscopeJIT() - : ES(SSP), - Resolver(createLegacyLookupResolver( + : Resolver(createLegacyLookupResolver( [this](const std::string &Name) { return ObjectLayer.findSymbol(Name, true); }, @@ -126,7 +125,6 @@ private: return nullptr; } - SymbolStringPool SSP; ExecutionSession ES; std::shared_ptr<SymbolResolver> Resolver; std::unique_ptr<TargetMachine> TM; |