[llvm-dev] Kaleidoscope examples on Windows

Russell Wallace via llvm-dev llvm-dev at lists.llvm.org
Thu Mar 31 03:58:13 PDT 2016


Trying to trace why the version compiled with Microsoft C++ crashes,  it is
in this part of the code...

      // Get the address of the JIT'd function in memory.
      auto ExprSymbol = J.findUnmangledSymbol("__anon_expr");

      // Cast it to the right type (takes no arguments, returns a double)
so we
      // can call it as a native function.
      double (*FP)() = (double (*)())(intptr_t)ExprSymbol.getAddress();

FP  is null, so it's not finding the symbol,  though I don't know why not.


On Thu, Mar 31, 2016 at 8:13 AM, Russell Wallace <russell.wallace at gmail.com>
wrote:

>  Are the Kaleidoscope examples supposed to work on Windows?  e.g.
>
> C:\llvm\examples\Kaleidoscope\Orc\initial\toy.cpp
>
>  when I try to compile this with clang it gives compile time error
> messages, and when I try with Microsoft C++ it generates an executable that
> runs but crashes when I type in an expression;  I get similar results with
> a few of the other versions. I can give more detailed feedback if that
> would help, just checking first to see what should work or if there's
> something else I should be doing.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160331/1a7841f6/attachment.html>


More information about the llvm-dev mailing list