{"action":"created","comment":{"url":"https://api.github.com/repos/bscarlet/llvm-general/pulls/comments/77331305","id":77331305,"diff_hunk":"@@ -0,0 +1,59 @@\n+#ifndef __LLVM_GENERAL_INTERNAL_FFI__ORC_JIT__HPP__\n+#define __LLVM_GENERAL_INTERNAL_FFI__ORC_JIT__HPP__\n+\n+#include \"LLVM/General/Internal/FFI/OrcJIT.h\"\n+#include \"LLVM/General/Internal/FFI/Target.hpp\"\n+\n+#include \"llvm/ExecutionEngine/Orc/IRCompileLayer.h\"\n+#include \"llvm/ExecutionEngine/Orc/JITSymbol.h\"\n+#include \"llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h\"\n+\n+typedef llvm::orc::ObjectLinkingLayer<> *LLVMObjectLinkingLayerRef;\n+typedef llvm::orc::IRCompileLayer<llvm::orc::ObjectLinkingLayer<>>\n+    *LLVMIRCompileLayerRef;\n+typedef llvm::orc::JITSymbol *LLVMJITSymbolRef;\n+typedef llvm::orc::ObjectLinkingLayer<>::ObjSetHandleT *LLVMModuleSetHandleRef;\n+\n+extern \"C\" {\n+LLVMIRCompileLayerRef\n+LLVM_General_createIRCompileLayer(LLVMObjectLinkingLayerRef objectLayer,\n+                                  LLVMTargetMachineRef tm);","path":"llvm-general/src/LLVM/General/Internal/FFI/OrcJIT.hpp","position":20,"original_position":20,"commit_id":"9aa5c1687824790d07babb816824ac132d1f6e4b","original_commit_id":"ea117f31463dee4b9f2c5170ac9c4515ec3d7382","user":{"login":"bscarlet","id":4196463,"avatar_url":"https://avatars.githubusercontent.com/u/4196463?v=3","gravatar_id":"","url":"https://api.github.com/users/bscarlet","html_url":"https://github.com/bscarlet","followers_url":"https://api.github.com/users/bscarlet/followers","following_url":"https://api.github.com/users/bscarlet/following{/other_user}","gists_url":"https://api.github.com/users/bscarlet/gists{/gist_id}","starred_url":"https://api.github.com/users/bscarlet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bscarlet/subscriptions","organizations_url":"https://api.github.com/users/bscarlet/orgs","repos_url":"https://api.github.com/users/bscarlet/repos","events_url":"https://api.github.com/users/bscarlet/events{/privacy}","received_events_url":"https://api.github.com/users/bscarlet/received_events","type":"User","site_admin":false},"body":"Please explain more. I haven't made such declarations before to the best of my knowledge, so it seems inconsistent to me.\r\n\r\nWhat simplification do you mean?","created_at":"2016-09-02T11:22:51Z","updated_at":"2016-09-02T11:22:51Z","html_url":"https://github.com/bscarlet/llvm-general/pull/187#discussion_r77331305","pull_request_url":"https://api.github.com/repos/bscarlet/llvm-general/pulls/187","_links":{"self":{"href":"https://api.github.com/repos/bscarlet/llvm-general/pulls/comments/77331305"},"html":{"href":"https://github.com/bscarlet/llvm-general/pull/187#discussion_r77331305"},"pull_request":{"href":"https://api.github.com/repos/bscarlet/llvm-general/pulls/187"}}},"pull_request":{"url":"https://api.github.com/repos/bscarlet/llvm-general/pulls/187","id":82996081,"html_url":"https://github.com/bscarlet/llvm-general/pull/187","diff_url":"https://github.com/bscarlet/llvm-general/pull/187.diff","patch_url":"https://github.com/bscarlet/llvm-general/pull/187.patch","issue_url":"https://api.github.com/repos/bscarlet/llvm-general/issues/187","number":187,"state":"open","locked":false,"title":"Add bindings to ORC JIT","user":{"login":"cocreature","id":1313584,"avatar_url":"https://avatars.githubusercontent.com/u/1313584?v=3","gravatar_id":"","url":"https://api.github.com/users/cocreature","html_url":"https://github.com/cocreature","followers_url":"https://api.github.com/users/cocreature/followers","following_url":"https://api.github.com/users/cocreature/following{/other_user}","gists_url":"https://api.github.com/users/cocreature/gists{/gist_id}","starred_url":"https://api.github.com/users/cocreature/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cocreature/subscriptions","organizations_url":"https://api.github.com/users/cocreature/orgs","repos_url":"https://api.github.com/users/cocreature/repos","events_url":"https://api.github.com/users/cocreature/events{/privacy}","received_events_url":"https://api.github.com/users/cocreature/received_events","type":"User","site_admin":false},"body":"The bindings only cover the part that’s exposed by the C API but it looks like most of the important stuff is in there or at least enough to be useful on its own. One function is missing which requires bindings to the object loading stuff which is orthogonal to this PR. Should be easy to add once we have those.\r\n\r\nI deliberately didn’t provide instances for `ExecuteEngine` because that would expose a lossy API that doesn’t have the benefits that this JIT gives you and I don’t see a lot of value in abstracting over the JIT (frankly I’d rather kill that abstraction completely but that’s a separate issue and out of scope for this PR).","created_at":"2016-08-27T19:15:12Z","updated_at":"2016-09-02T11:22:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1856534b08c338d6a2d5b370b0b11162287be8c4","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/bscarlet/llvm-general/pulls/187/commits","review_comments_url":"https://api.github.com/repos/bscarlet/llvm-general/pulls/187/comments","review_comment_url":"https://api.github.com/repos/bscarlet/llvm-general/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bscarlet/llvm-general/issues/187/comments","statuses_url":"https://api.github.com/repos/bscarlet/llvm-general/statuses/9aa5c1687824790d07babb816824ac132d1f6e4b","head":{"label":"cocreature:orcjit","ref":"orcjit","sha":"9aa5c1687824790d07babb816824ac132d1f6e4b","user":{"login":"cocreature","id":1313584,"avatar_url":"https://avatars.githubusercontent.com/u/1313584?v=3","gravatar_id":"","url":"https://api.github.com/users/cocreature","html_url":"https://github.com/cocreature","followers_url":"https://api.github.com/users/cocreature/followers","following_url":"https://api.github.com/users/cocreature/following{/other_user}","gists_url":"https://api.github.com/users/cocreature/gists{/gist_id}","starred_url":"https://api.github.com/users/cocreature/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cocreature/subscriptions","organizations_url":"https://api.github.com/users/cocreature/orgs","repos_url":"https://api.github.com/users/cocreature/repos","events_url":"https://api.github.com/users/cocreature/events{/privacy}","received_events_url":"https://api.github.com/users/cocreature/received_events","type":"User","site_admin":false},"repo":{"id":53683350,"name":"llvm-general","full_name":"cocreature/llvm-general","owner":{"login":"cocreature","id":1313584,"avatar_url":"https://avatars.githubusercontent.com/u/1313584?v=3","gravatar_id":"","url":"https://api.github.com/users/cocreature","html_url":"https://github.com/cocreature","followers_url":"https://api.github.com/users/cocreature/followers","following_url":"https://api.github.com/users/cocreature/following{/other_user}","gists_url":"https://api.github.com/users/cocreature/gists{/gist_id}","starred_url":"https://api.github.com/users/cocreature/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cocreature/subscriptions","organizations_url":"https://api.github.com/users/cocreature/orgs","repos_url":"https://api.github.com/users/cocreature/repos","events_url":"https://api.github.com/users/cocreature/events{/privacy}","received_events_url":"https://api.github.com/users/cocreature/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cocreature/llvm-general","description":"Rich LLVM bindings for Haskell (with transfer of LLVM IR to and from C++, detailed compilation pass control, etc.)","fork":true,"url":"https://api.github.com/repos/cocreature/llvm-general","forks_url":"https://api.github.com/repos/cocreature/llvm-general/forks","keys_url":"https://api.github.com/repos/cocreature/llvm-general/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cocreature/llvm-general/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cocreature/llvm-general/teams","hooks_url":"https://api.github.com/repos/cocreature/llvm-general/hooks","issue_events_url":"https://api.github.com/repos/cocreature/llvm-general/issues/events{/number}","events_url":"https://api.github.com/repos/cocreature/llvm-general/events","assignees_url":"https://api.github.com/repos/cocreature/llvm-general/assignees{/user}","branches_url":"https://api.github.com/repos/cocreature/llvm-general/branches{/branch}","tags_url":"https://api.github.com/repos/cocreature/llvm-general/tags","blobs_url":"https://api.github.com/repos/cocreature/llvm-general/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cocreature/llvm-general/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cocreature/llvm-general/git/refs{/sha}","trees_url":"https://api.github.com/repos/cocreature/llvm-general/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cocreature/llvm-general/statuses/{sha}","languages_url":"https://api.github.com/repos/cocreature/llvm-general/languages","stargazers_url":"https://api.github.com/repos/cocreature/llvm-general/stargazers","contributors_url":"https://api.github.com/repos/cocreature/llvm-general/contributors","subscribers_url":"https://api.github.com/repos/cocreature/llvm-general/subscribers","subscription_url":"https://api.github.com/repos/cocreature/llvm-general/subscription","commits_url":"https://api.github.com/repos/cocreature/llvm-general/commits{/sha}","git_commits_url":"https://api.github.com/repos/cocreature/llvm-general/git/commits{/sha}","comments_url":"https://api.github.com/repos/cocreature/llvm-general/comments{/number}","issue_comment_url":"https://api.github.com/repos/cocreature/llvm-general/issues/comments{/number}","contents_url":"https://api.github.com/repos/cocreature/llvm-general/contents/{+path}","compare_url":"https://api.github.com/repos/cocreature/llvm-general/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cocreature/llvm-general/merges","archive_url":"https://api.github.com/repos/cocreature/llvm-general/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cocreature/llvm-general/downloads","issues_url":"https://api.github.com/repos/cocreature/llvm-general/issues{/number}","pulls_url":"https://api.github.com/repos/cocreature/llvm-general/pulls{/number}","milestones_url":"https://api.github.com/repos/cocreature/llvm-general/milestones{/number}","notifications_url":"https://api.github.com/repos/cocreature/llvm-general/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cocreature/llvm-general/labels{/name}","releases_url":"https://api.github.com/repos/cocreature/llvm-general/releases{/id}","deployments_url":"https://api.github.com/repos/cocreature/llvm-general/deployments","created_at":"2016-03-11T17:10:54Z","updated_at":"2016-03-11T17:10:56Z","pushed_at":"2016-08-31T14:17:58Z","git_url":"git://github.com/cocreature/llvm-general.git","ssh_url":"git@github.com:cocreature/llvm-general.git","clone_url":"https://github.com/cocreature/llvm-general.git","svn_url":"https://github.com/cocreature/llvm-general","homepage":"http://hackage.haskell.org/package/llvm-general","size":3112,"stargazers_count":0,"watchers_count":0,"language":"Haskell","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":0,"forks":2,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"bscarlet:llvm-3.9","ref":"llvm-3.9","sha":"733b17b9c1a98200584a9247d6cc7a05590c6802","user":{"login":"bscarlet","id":4196463,"avatar_url":"https://avatars.githubusercontent.com/u/4196463?v=3","gravatar_id":"","url":"https://api.github.com/users/bscarlet","html_url":"https://github.com/bscarlet","followers_url":"https://api.github.com/users/bscarlet/followers","following_url":"https://api.github.com/users/bscarlet/following{/other_user}","gists_url":"https://api.github.com/users/bscarlet/gists{/gist_id}","starred_url":"https://api.github.com/users/bscarlet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bscarlet/subscriptions","organizations_url":"https://api.github.com/users/bscarlet/orgs","repos_url":"https://api.github.com/users/bscarlet/repos","events_url":"https://api.github.com/users/bscarlet/events{/privacy}","received_events_url":"https://api.github.com/users/bscarlet/received_events","type":"User","site_admin":false},"repo":{"id":10741539,"name":"llvm-general","full_name":"bscarlet/llvm-general","owner":{"login":"bscarlet","id":4196463,"avatar_url":"https://avatars.githubusercontent.com/u/4196463?v=3","gravatar_id":"","url":"https://api.github.com/users/bscarlet","html_url":"https://github.com/bscarlet","followers_url":"https://api.github.com/users/bscarlet/followers","following_url":"https://api.github.com/users/bscarlet/following{/other_user}","gists_url":"https://api.github.com/users/bscarlet/gists{/gist_id}","starred_url":"https://api.github.com/users/bscarlet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bscarlet/subscriptions","organizations_url":"https://api.github.com/users/bscarlet/orgs","repos_url":"https://api.github.com/users/bscarlet/repos","events_url":"https://api.github.com/users/bscarlet/events{/privacy}","received_events_url":"https://api.github.com/users/bscarlet/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bscarlet/llvm-general","description":"Rich LLVM bindings for Haskell (with transfer of LLVM IR to and from C++, detailed compilation pass control, etc.)","fork":false,"url":"https://api.github.com/repos/bscarlet/llvm-general","forks_url":"https://api.github.com/repos/bscarlet/llvm-general/forks","keys_url":"https://api.github.com/repos/bscarlet/llvm-general/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bscarlet/llvm-general/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bscarlet/llvm-general/teams","hooks_url":"https://api.github.com/repos/bscarlet/llvm-general/hooks","issue_events_url":"https://api.github.com/repos/bscarlet/llvm-general/issues/events{/number}","events_url":"https://api.github.com/repos/bscarlet/llvm-general/events","assignees_url":"https://api.github.com/repos/bscarlet/llvm-general/assignees{/user}","branches_url":"https://api.github.com/repos/bscarlet/llvm-general/branches{/branch}","tags_url":"https://api.github.com/repos/bscarlet/llvm-general/tags","blobs_url":"https://api.github.com/repos/bscarlet/llvm-general/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bscarlet/llvm-general/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bscarlet/llvm-general/git/refs{/sha}","trees_url":"https://api.github.com/repos/bscarlet/llvm-general/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bscarlet/llvm-general/statuses/{sha}","languages_url":"https://api.github.com/repos/bscarlet/llvm-general/languages","stargazers_url":"https://api.github.com/repos/bscarlet/llvm-general/stargazers","contributors_url":"https://api.github.com/repos/bscarlet/llvm-general/contributors","subscribers_url":"https://api.github.com/repos/bscarlet/llvm-general/subscribers","subscription_url":"https://api.github.com/repos/bscarlet/llvm-general/subscription","commits_url":"https://api.github.com/repos/bscarlet/llvm-general/commits{/sha}","git_commits_url":"https://api.github.com/repos/bscarlet/llvm-general/git/commits{/sha}","comments_url":"https://api.github.com/repos/bscarlet/llvm-general/comments{/number}","issue_comment_url":"https://api.github.com/repos/bscarlet/llvm-general/issues/comments{/number}","contents_url":"https://api.github.com/repos/bscarlet/llvm-general/contents/{+path}","compare_url":"https://api.github.com/repos/bscarlet/llvm-general/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bscarlet/llvm-general/merges","archive_url":"https://api.github.com/repos/bscarlet/llvm-general/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bscarlet/llvm-general/downloads","issues_url":"https://api.github.com/repos/bscarlet/llvm-general/issues{/number}","pulls_url":"https://api.github.com/repos/bscarlet/llvm-general/pulls{/number}","milestones_url":"https://api.github.com/repos/bscarlet/llvm-general/milestones{/number}","notifications_url":"https://api.github.com/repos/bscarlet/llvm-general/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bscarlet/llvm-general/labels{/name}","releases_url":"https://api.github.com/repos/bscarlet/llvm-general/releases{/id}","deployments_url":"https://api.github.com/repos/bscarlet/llvm-general/deployments","created_at":"2013-06-17T16:17:03Z","updated_at":"2016-08-30T16:07:59Z","pushed_at":"2016-08-31T14:17:58Z","git_url":"git://github.com/bscarlet/llvm-general.git","ssh_url":"git@github.com:bscarlet/llvm-general.git","clone_url":"https://github.com/bscarlet/llvm-general.git","svn_url":"https://github.com/bscarlet/llvm-general","homepage":"http://hackage.haskell.org/package/llvm-general","size":3591,"stargazers_count":109,"watchers_count":109,"language":"Haskell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":36,"mirror_url":null,"open_issues_count":23,"forks":36,"open_issues":23,"watchers":109,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bscarlet/llvm-general/pulls/187"},"html":{"href":"https://github.com/bscarlet/llvm-general/pull/187"},"issue":{"href":"https://api.github.com/repos/bscarlet/llvm-general/issues/187"},"comments":{"href":"https://api.github.com/repos/bscarlet/llvm-general/issues/187/comments"},"review_comments":{"href":"https://api.github.com/repos/bscarlet/llvm-general/pulls/187/comments"},"review_comment":{"href":"https://api.github.com/repos/bscarlet/llvm-general/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bscarlet/llvm-general/pulls/187/commits"},"statuses":{"href":"https://api.github.com/repos/bscarlet/llvm-general/statuses/9aa5c1687824790d07babb816824ac132d1f6e4b"}}}}
{"actor":{"display_login":"bscarlet"}}