diff options
Diffstat (limited to 'llvm/examples/Kaleidoscope')
-rw-r--r-- | llvm/examples/Kaleidoscope/Chapter4/toy.cpp | 10 | ||||
-rw-r--r-- | llvm/examples/Kaleidoscope/Chapter5/toy.cpp | 10 | ||||
-rw-r--r-- | llvm/examples/Kaleidoscope/Chapter6/toy.cpp | 10 | ||||
-rw-r--r-- | llvm/examples/Kaleidoscope/Chapter7/toy.cpp | 10 |
4 files changed, 12 insertions, 28 deletions
diff --git a/llvm/examples/Kaleidoscope/Chapter4/toy.cpp b/llvm/examples/Kaleidoscope/Chapter4/toy.cpp index d136635e811..cdc9d74dde3 100644 --- a/llvm/examples/Kaleidoscope/Chapter4/toy.cpp +++ b/llvm/examples/Kaleidoscope/Chapter4/toy.cpp @@ -4,7 +4,6 @@ #include "llvm/ExecutionEngine/JIT.h" #include "llvm/LLVMContext.h" #include "llvm/Module.h" -#include "llvm/ModuleProvider.h" #include "llvm/PassManager.h" #include "llvm/Analysis/Verifier.h" #include "llvm/Target/TargetData.h" @@ -573,13 +572,10 @@ int main() { // Make the module, which holds all the code. TheModule = new Module("my cool jit", Context); - ExistingModuleProvider *OurModuleProvider = - new ExistingModuleProvider(TheModule); + // Create the JIT. This takes ownership of the module. + TheExecutionEngine = EngineBuilder(TheModule).create(); - // Create the JIT. This takes ownership of the module and module provider. - TheExecutionEngine = EngineBuilder(OurModuleProvider).create(); - - FunctionPassManager OurFPM(OurModuleProvider); + FunctionPassManager OurFPM(TheModule); // Set up the optimizer pipeline. Start with registering info about how the // target lays out data structures. diff --git a/llvm/examples/Kaleidoscope/Chapter5/toy.cpp b/llvm/examples/Kaleidoscope/Chapter5/toy.cpp index c2613e36029..24f551f3a69 100644 --- a/llvm/examples/Kaleidoscope/Chapter5/toy.cpp +++ b/llvm/examples/Kaleidoscope/Chapter5/toy.cpp @@ -4,7 +4,6 @@ #include "llvm/ExecutionEngine/JIT.h" #include "llvm/LLVMContext.h" #include "llvm/Module.h" -#include "llvm/ModuleProvider.h" #include "llvm/PassManager.h" #include "llvm/Analysis/Verifier.h" #include "llvm/Target/TargetData.h" @@ -818,13 +817,10 @@ int main() { // Make the module, which holds all the code. TheModule = new Module("my cool jit", Context); - ExistingModuleProvider *OurModuleProvider = - new ExistingModuleProvider(TheModule); + // Create the JIT. This takes ownership of the module. + TheExecutionEngine = EngineBuilder(TheModule).create(); - // Create the JIT. This takes ownership of the module and module provider. - TheExecutionEngine = EngineBuilder(OurModuleProvider).create(); - - FunctionPassManager OurFPM(OurModuleProvider); + FunctionPassManager OurFPM(TheModule); // Set up the optimizer pipeline. Start with registering info about how the // target lays out data structures. diff --git a/llvm/examples/Kaleidoscope/Chapter6/toy.cpp b/llvm/examples/Kaleidoscope/Chapter6/toy.cpp index 638a340d51a..f4b5b8cd388 100644 --- a/llvm/examples/Kaleidoscope/Chapter6/toy.cpp +++ b/llvm/examples/Kaleidoscope/Chapter6/toy.cpp @@ -4,7 +4,6 @@ #include "llvm/ExecutionEngine/JIT.h" #include "llvm/LLVMContext.h" #include "llvm/Module.h" -#include "llvm/ModuleProvider.h" #include "llvm/PassManager.h" #include "llvm/Analysis/Verifier.h" #include "llvm/Target/TargetData.h" @@ -936,13 +935,10 @@ int main() { // Make the module, which holds all the code. TheModule = new Module("my cool jit", Context); - ExistingModuleProvider *OurModuleProvider = - new ExistingModuleProvider(TheModule); + // Create the JIT. This takes ownership of the module. + TheExecutionEngine = EngineBuilder(TheModule).create(); - // Create the JIT. This takes ownership of the module and module provider. - TheExecutionEngine = EngineBuilder(OurModuleProvider).create(); - - FunctionPassManager OurFPM(OurModuleProvider); + FunctionPassManager OurFPM(TheModule); // Set up the optimizer pipeline. Start with registering info about how the // target lays out data structures. diff --git a/llvm/examples/Kaleidoscope/Chapter7/toy.cpp b/llvm/examples/Kaleidoscope/Chapter7/toy.cpp index 8b0c321c06c..951dfd8e63a 100644 --- a/llvm/examples/Kaleidoscope/Chapter7/toy.cpp +++ b/llvm/examples/Kaleidoscope/Chapter7/toy.cpp @@ -4,7 +4,6 @@ #include "llvm/ExecutionEngine/JIT.h" #include "llvm/LLVMContext.h" #include "llvm/Module.h" -#include "llvm/ModuleProvider.h" #include "llvm/PassManager.h" #include "llvm/Analysis/Verifier.h" #include "llvm/Target/TargetData.h" @@ -1100,13 +1099,10 @@ int main() { // Make the module, which holds all the code. TheModule = new Module("my cool jit", Context); - ExistingModuleProvider *OurModuleProvider = - new ExistingModuleProvider(TheModule); + // Create the JIT. This takes ownership of the module. + TheExecutionEngine = EngineBuilder(TheModule).create(); - // Create the JIT. This takes ownership of the module and module provider. - TheExecutionEngine = EngineBuilder(OurModuleProvider).create(); - - FunctionPassManager OurFPM(OurModuleProvider); + FunctionPassManager OurFPM(TheModule); // Set up the optimizer pipeline. Start with registering info about how the // target lays out data structures. |