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 | 207b6abad40835f1f8a05a3050a5731c86c9b953 (patch) | |
tree | 9f2277cff177f37f265d30cda4893868ac502768 /examples | |
parent | 2bd75068e130202fa7f2b0bb2ee21c7e86a57822 (diff) |
[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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284657 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'examples')
-rw-r--r-- | examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h b/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h index b122386ff65..f11f0369c42 100644 --- a/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h +++ b/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, |