summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/Kaleidoscope/toy.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/Kaleidoscope/toy.cpp b/examples/Kaleidoscope/toy.cpp
index 3c1ce8b4d4..6b0560a144 100644
--- a/examples/Kaleidoscope/toy.cpp
+++ b/examples/Kaleidoscope/toy.cpp
@@ -1107,12 +1107,13 @@ int main() {
// Make the module, which holds all the code.
TheModule = new Module("my cool jit", Context);
-
- // Create the JIT.
- TheExecutionEngine = EngineBuilder(TheModule).create();
{
ExistingModuleProvider OurModuleProvider(TheModule);
+
+ // Create the JIT.
+ TheExecutionEngine = EngineBuilder(&OurModuleProvider).create();
+
FunctionPassManager OurFPM(&OurModuleProvider);
// Set up the optimizer pipeline. Start with registering info about how the