<div dir="ltr"><p style="border:0px;color:rgb(218,215,209);margin:0px 0px 1em;padding:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;line-height:inherit;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:15px;vertical-align:baseline;box-sizing:inherit;clear:both">Hello All,</p><p style="border:0px;color:rgb(218,215,209);margin:0px 0px 1em;padding:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;line-height:inherit;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:15px;vertical-align:baseline;box-sizing:inherit;clear:both">I am using LLVM-8.0 and creating an Execution Engine as below of kind Interpreter. Am I doing it right Please let me know.</p><p style="border:0px;color:rgb(218,215,209);margin:0px 0px 1em;padding:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;line-height:inherit;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:15px;vertical-align:baseline;box-sizing:inherit;clear:both">int loadIRFile__name(const char *filename) {</p><pre style="background-color:rgb(29,31,32);border:0px;color:rgb(218,215,209);white-space:pre-wrap;font-size:13px;margin-top:0px;margin-bottom:1em;padding:12px 8px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;line-height:inherit;font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace,sans-serif;vertical-align:baseline;box-sizing:inherit;width:auto;max-height:600px;overflow:auto;border-radius:3px"><code style="border:0px;margin:0px;padding:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace,sans-serif;vertical-align:baseline;box-sizing:inherit;white-space:inherit">LLVMContext *contextHandle = new LLVMContext();
SMDiagnostic error;
// Load the bitcode from the .bc file
Module *moduleHandle = parseIRFile(filename, error, *me).release();
return (intptr_t) moduleHandle;
</code></pre><p style="border:0px;color:rgb(218,215,209);margin:0px 0px 1em;padding:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;line-height:inherit;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:15px;vertical-align:baseline;box-sizing:inherit;clear:both">}</p><p style="border:0px;color:rgb(218,215,209);margin:0px 0px 1em;padding:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;line-height:inherit;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:15px;vertical-align:baseline;box-sizing:inherit;clear:both">int EngineBuilder__create(moduleHandle) {</p><pre style="background-color:rgb(29,31,32);border:0px;color:rgb(218,215,209);white-space:pre-wrap;font-size:13px;margin-top:0px;margin-bottom:1em;padding:12px 8px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;line-height:inherit;font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace,sans-serif;vertical-align:baseline;box-sizing:inherit;width:auto;max-height:600px;overflow:auto;border-radius:3px"><code style="border:0px;margin:0px;padding:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace,sans-serif;vertical-align:baseline;box-sizing:inherit;white-space:inherit">std::unique_ptr<Module> parModule((Module*) moduleHandle);
EngineBuilder *engineBuilder = new EngineBuilder(std::move(parModule));
return (intptr_t) engineBuilder;
</code></pre><p style="border:0px;color:rgb(218,215,209);margin:0px 0px 1em;padding:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;line-height:inherit;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:15px;vertical-align:baseline;box-sizing:inherit;clear:both">}</p><p style="border:0px;color:rgb(218,215,209);margin:0px 0px 1em;padding:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;line-height:inherit;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:15px;vertical-align:baseline;box-sizing:inherit;clear:both">void EngineBuilder__setInterpreter(ebHandle) {</p><pre style="background-color:rgb(29,31,32);border:0px;color:rgb(218,215,209);white-space:pre-wrap;font-size:13px;margin-top:0px;margin-bottom:1em;padding:12px 8px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;line-height:inherit;font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace,sans-serif;vertical-align:baseline;box-sizing:inherit;width:auto;max-height:600px;overflow:auto;border-radius:3px"><code style="border:0px;margin:0px;padding:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace,sans-serif;vertical-align:baseline;box-sizing:inherit;white-space:inherit">EngineBuilder *eb = (EngineBuilder*)_me;
eb->setEngineKind(EngineKind::Interpreter);
</code></pre><p style="border:0px;color:rgb(218,215,209);margin:0px 0px 1em;padding:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;line-height:inherit;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:15px;vertical-align:baseline;box-sizing:inherit;clear:both">}</p><p style="border:0px;color:rgb(218,215,209);margin:0px 0px 1em;padding:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;line-height:inherit;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:15px;vertical-align:baseline;box-sizing:inherit;clear:both">int ExecutionEngine__build(ebHandle) {</p><pre style="background-color:rgb(29,31,32);border:0px;color:rgb(218,215,209);white-space:pre-wrap;font-size:13px;margin-top:0px;margin-bottom:1em;padding:12px 8px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;line-height:inherit;font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace,sans-serif;vertical-align:baseline;box-sizing:inherit;width:auto;max-height:600px;overflow:auto;border-radius:3px"><code style="border:0px;margin:0px;padding:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace,sans-serif;vertical-align:baseline;box-sizing:inherit;white-space:inherit">EngineBuilder *me = (EngineBuilder*)ebHandle;
ExecutionEngine *executionEngine = me->create();
return (intptr_t) executionEngine;
</code></pre><p style="border:0px;color:rgb(218,215,209);margin:0px 0px 1em;padding:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;line-height:inherit;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:15px;vertical-align:baseline;box-sizing:inherit;clear:both">}</p><p style="border:0px;color:rgb(218,215,209);margin:0px 0px 1em;padding:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;line-height:inherit;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:15px;vertical-align:baseline;box-sizing:inherit;clear:both">I need to return the pointer as int</p><p style="border:0px;color:rgb(218,215,209);margin:0px 0px 1em;padding:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;line-height:inherit;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:15px;vertical-align:baseline;box-sizing:inherit;clear:both"><br></p><p style="border:0px;color:rgb(218,215,209);margin:0px 0px 1em;padding:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;line-height:inherit;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:15px;vertical-align:baseline;box-sizing:inherit;clear:both">Best regards</p><p style="border:0px;color:rgb(218,215,209);margin:0px 0px 1em;padding:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;line-height:inherit;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:15px;vertical-align:baseline;box-sizing:inherit;clear:both">Manoj</p></div>