summaryrefslogtreecommitdiffstats
path: root/llvm/examples
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2018-04-02 20:57:56 +0000
committerLang Hames <lhames@gmail.com>2018-04-02 20:57:56 +0000
commit3fdfc04e5339c1d0ad838c1e5531b3a2e4377ec3 (patch)
treeb9a2a81ff5a623dc196685546a58e9f79790a22e /llvm/examples
parent321c2487d7b1806cb3cc1a2391b130935bc06b64 (diff)
downloadbcm5719-llvm-3fdfc04e5339c1d0ad838c1e5531b3a2e4377ec3.tar.gz
bcm5719-llvm-3fdfc04e5339c1d0ad838c1e5531b3a2e4377ec3.zip
[ORC] Create a new SymbolStringPool by default in ExecutionSession constructor.
This makes the common case of constructing an ExecutionSession tidier. llvm-svn: 329013
Diffstat (limited to 'llvm/examples')
-rw-r--r--llvm/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h4
-rw-r--r--llvm/examples/Kaleidoscope/BuildingAJIT/Chapter2/KaleidoscopeJIT.h4
-rw-r--r--llvm/examples/Kaleidoscope/BuildingAJIT/Chapter3/KaleidoscopeJIT.h3
-rw-r--r--llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h4
-rw-r--r--llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h4
-rw-r--r--llvm/examples/Kaleidoscope/include/KaleidoscopeJIT.h4
6 files changed, 6 insertions, 17 deletions
diff --git a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h
index a7eb1db8625..902f5f0403a 100644
--- a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h
+++ b/llvm/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/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter2/KaleidoscopeJIT.h b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter2/KaleidoscopeJIT.h
index 679d72e2050..653e2fd302b 100644
--- a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter2/KaleidoscopeJIT.h
+++ b/llvm/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/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter3/KaleidoscopeJIT.h b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter3/KaleidoscopeJIT.h
index cca82293018..fa306c61789 100644
--- a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter3/KaleidoscopeJIT.h
+++ b/llvm/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/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h
index 6378dd61e29..c4ddc5094c4 100644
--- a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h
+++ b/llvm/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/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h
index acb4090b5eb..d41cce717d4 100644
--- a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h
+++ b/llvm/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/llvm/examples/Kaleidoscope/include/KaleidoscopeJIT.h b/llvm/examples/Kaleidoscope/include/KaleidoscopeJIT.h
index 3e2fe42a5d8..79d39515625 100644
--- a/llvm/examples/Kaleidoscope/include/KaleidoscopeJIT.h
+++ b/llvm/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;
OpenPOWER on IntegriCloud