diff options
| author | Lang Hames <lhames@gmail.com> | 2016-10-19 22:41:03 +0000 |
|---|---|---|
| committer | Lang Hames <lhames@gmail.com> | 2016-10-19 22:41:03 +0000 |
| commit | 1009b0b30fa791ee686d18498cdf7a7dde0e5c93 (patch) | |
| tree | 76ec6a6c236816b65f2dada21e78fa7da2c26669 /llvm/examples | |
| parent | db46b7d217ed4462a4a02d0111e25593287dfcf1 (diff) | |
| download | bcm5719-llvm-1009b0b30fa791ee686d18498cdf7a7dde0e5c93.tar.gz bcm5719-llvm-1009b0b30fa791ee686d18498cdf7a7dde0e5c93.zip | |
[BuildingAJIT] Use the remote target triple to construct the TargetMachine in
Chapter 5.
Chapter 5 demonstrates remote JITing: code is executed on the remote, not the
machine running the REPL, so it's the remote's triple (and TargetMachine) that
we need.
llvm-svn: 284657
Diffstat (limited to 'llvm/examples')
| -rw-r--r-- | llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h index b122386ff65..f11f0369c42 100644 --- a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h +++ b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h @@ -87,7 +87,8 @@ public: typedef decltype(OptimizeLayer)::ModuleSetHandleT ModuleHandle; KaleidoscopeJIT(MyRemote &Remote) - : TM(EngineBuilder().selectTarget()), + : TM(EngineBuilder().selectTarget(Triple(Remote.getTargetTriple()), "", + "", SmallVector<std::string, 0>())), DL(TM->createDataLayout()), CompileLayer(ObjectLayer, SimpleCompiler(*TM)), OptimizeLayer(CompileLayer, |

