llvm.org GIT mirror llvm / 986e22d
[BuildingAJIT] Simplify a tutorial example and fix a syntax error. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344712 91177308-0d34-0410-b5e6-96231b3b80d8 Lang Hames 10 months ago
1 changed file(s) with 2 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
7474
7575 .. code-block:: c++
7676
77 std::unique_ptr M = buildModule();
7877 JIT J;
79 J.addModule(*M);
80 auto *Main = (int(*)(int, char*[]))J.lookup("main");.getAddress();
78 J.addModule(buildModule());
79 auto *Main = (int(*)(int, char*[]))J.lookup("main").getAddress();
8180 int Result = Main();
8281
8382 The APIs that we build in these tutorials will all be variations on this simple