fixed orc example, fixed part of arith example #17
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes parts of #13
I ran across the same problem when trying to run the ORC and Arith examples, so I took a deep dive into LLVM and found out the following:
ORC
This example was simply missing the registration of the module, ie. the call to
withModule
. Therefore, theadd
symbol could not be found (that llvm-hs simply returns aJITSymbolError ""
without any message is a bug imo, I'm going to report that right after).Arith
In this example, the symbol resolver was not registered and added to the resolver map. Therefore, an error was thrown in the call to
withModule
, which needs a resolver. However, this example still does not work (can't find the symbol); the problem lies somewhere in the module definition (I tried executing the module with theeagerJit
function from ORC, and that didn't work either); I haven't been able to look into that more.