{"action":"created","comment":{"url":"https://api.github.com/repos/halide/Halide/pulls/comments/27816575","id":27816575,"diff_hunk":"@@ -123,14 +123,18 @@ StructType *Closure::build_type(LLVMContext *context) {\n     return struct_t;\n }\n \n-void Closure::pack_struct(Value *dst, const Scope<Value *> &src, IRBuilder<> *builder) {\n-    // dst should be a pointer to a struct of the type returned by build_type\n+void Closure::pack_struct(llvm::Type *type, Value *dst, const Scope<Value *> &src, IRBuilder<> *builder) {\n+    // type, type of dst should be a pointer to a struct of the type returned by build_type\n     int idx = 0;\n     LLVMContext &context = builder->getContext();\n     vector<string> nm = names();\n     vector<llvm::Type*> ty = llvm_types(&context);\n     for (size_t i = 0; i < nm.size(); i++) {\n+#if LLVM_VERSION >= 37\n+        Value *ptr = builder->CreateConstInBoundsGEP2_32(type, dst, 0, idx);\n+#else\n         Value *ptr = builder->CreateConstInBoundsGEP2_32(dst, 0, idx);","path":"src/CodeGen_Internal.cpp","position":16,"original_position":16,"commit_id":"737a9b8159e731fe62c2a1f8bf5202cf70d773c7","original_commit_id":"737a9b8159e731fe62c2a1f8bf5202cf70d773c7","user":{"login":"aam","id":381137,"avatar_url":"https://avatars.githubusercontent.com/u/381137?v=3","gravatar_id":"","url":"https://api.github.com/users/aam","html_url":"https://github.com/aam","followers_url":"https://api.github.com/users/aam/followers","following_url":"https://api.github.com/users/aam/following{/other_user}","gists_url":"https://api.github.com/users/aam/gists{/gist_id}","starred_url":"https://api.github.com/users/aam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aam/subscriptions","organizations_url":"https://api.github.com/users/aam/orgs","repos_url":"https://api.github.com/users/aam/repos","events_url":"https://api.github.com/users/aam/events{/privacy}","received_events_url":"https://api.github.com/users/aam/received_events","type":"User","site_admin":false},"body":"Ah, these warnings got to be gcc thing as I checked with llvm/clang and it compiles cleanly with 3.6","created_at":"2015-04-06T18:17:03Z","updated_at":"2015-04-06T18:17:03Z","html_url":"https://github.com/halide/Halide/pull/731#discussion_r27816575","pull_request_url":"https://api.github.com/repos/halide/Halide/pulls/731","_links":{"self":{"href":"https://api.github.com/repos/halide/Halide/pulls/comments/27816575"},"html":{"href":"https://github.com/halide/Halide/pull/731#discussion_r27816575"},"pull_request":{"href":"https://api.github.com/repos/halide/Halide/pulls/731"}}},"pull_request":{"url":"https://api.github.com/repos/halide/Halide/pulls/731","id":32695517,"html_url":"https://github.com/halide/Halide/pull/731","diff_url":"https://github.com/halide/Halide/pull/731.diff","patch_url":"https://github.com/halide/Halide/pull/731.patch","issue_url":"https://api.github.com/repos/halide/Halide/issues/731","number":731,"state":"open","locked":false,"title":"Halide master","user":{"login":"aam","id":381137,"avatar_url":"https://avatars.githubusercontent.com/u/381137?v=3","gravatar_id":"","url":"https://api.github.com/users/aam","html_url":"https://github.com/aam","followers_url":"https://api.github.com/users/aam/followers","following_url":"https://api.github.com/users/aam/following{/other_user}","gists_url":"https://api.github.com/users/aam/gists{/gist_id}","starred_url":"https://api.github.com/users/aam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aam/subscriptions","organizations_url":"https://api.github.com/users/aam/orgs","repos_url":"https://api.github.com/users/aam/repos","events_url":"https://api.github.com/users/aam/events{/privacy}","received_events_url":"https://api.github.com/users/aam/received_events","type":"User","site_admin":false},"body":"Accommodate LLVM trunk which as of couple days ago needs pointer types for CreateConstGEP2_32, CreateInBoundsGEP, CreateConstInBoundsGEP2_32, CreateConstInBoundsGEP1_32.","created_at":"2015-04-06T17:50:51Z","updated_at":"2015-04-06T18:17:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"06f4578cc14efa9826f07ce84d114dbd10b15321","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/halide/Halide/pulls/731/commits","review_comments_url":"https://api.github.com/repos/halide/Halide/pulls/731/comments","review_comment_url":"https://api.github.com/repos/halide/Halide/pulls/comments{/number}","comments_url":"https://api.github.com/repos/halide/Halide/issues/731/comments","statuses_url":"https://api.github.com/repos/halide/Halide/statuses/737a9b8159e731fe62c2a1f8bf5202cf70d773c7","head":{"label":"aam:halide_master","ref":"halide_master","sha":"737a9b8159e731fe62c2a1f8bf5202cf70d773c7","user":{"login":"aam","id":381137,"avatar_url":"https://avatars.githubusercontent.com/u/381137?v=3","gravatar_id":"","url":"https://api.github.com/users/aam","html_url":"https://github.com/aam","followers_url":"https://api.github.com/users/aam/followers","following_url":"https://api.github.com/users/aam/following{/other_user}","gists_url":"https://api.github.com/users/aam/gists{/gist_id}","starred_url":"https://api.github.com/users/aam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aam/subscriptions","organizations_url":"https://api.github.com/users/aam/orgs","repos_url":"https://api.github.com/users/aam/repos","events_url":"https://api.github.com/users/aam/events{/privacy}","received_events_url":"https://api.github.com/users/aam/received_events","type":"User","site_admin":false},"repo":{"id":27467429,"name":"Halide","full_name":"aam/Halide","owner":{"login":"aam","id":381137,"avatar_url":"https://avatars.githubusercontent.com/u/381137?v=3","gravatar_id":"","url":"https://api.github.com/users/aam","html_url":"https://github.com/aam","followers_url":"https://api.github.com/users/aam/followers","following_url":"https://api.github.com/users/aam/following{/other_user}","gists_url":"https://api.github.com/users/aam/gists{/gist_id}","starred_url":"https://api.github.com/users/aam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aam/subscriptions","organizations_url":"https://api.github.com/users/aam/orgs","repos_url":"https://api.github.com/users/aam/repos","events_url":"https://api.github.com/users/aam/events{/privacy}","received_events_url":"https://api.github.com/users/aam/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aam/Halide","description":"a language for image processing and computational photography","fork":true,"url":"https://api.github.com/repos/aam/Halide","forks_url":"https://api.github.com/repos/aam/Halide/forks","keys_url":"https://api.github.com/repos/aam/Halide/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aam/Halide/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aam/Halide/teams","hooks_url":"https://api.github.com/repos/aam/Halide/hooks","issue_events_url":"https://api.github.com/repos/aam/Halide/issues/events{/number}","events_url":"https://api.github.com/repos/aam/Halide/events","assignees_url":"https://api.github.com/repos/aam/Halide/assignees{/user}","branches_url":"https://api.github.com/repos/aam/Halide/branches{/branch}","tags_url":"https://api.github.com/repos/aam/Halide/tags","blobs_url":"https://api.github.com/repos/aam/Halide/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aam/Halide/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aam/Halide/git/refs{/sha}","trees_url":"https://api.github.com/repos/aam/Halide/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aam/Halide/statuses/{sha}","languages_url":"https://api.github.com/repos/aam/Halide/languages","stargazers_url":"https://api.github.com/repos/aam/Halide/stargazers","contributors_url":"https://api.github.com/repos/aam/Halide/contributors","subscribers_url":"https://api.github.com/repos/aam/Halide/subscribers","subscription_url":"https://api.github.com/repos/aam/Halide/subscription","commits_url":"https://api.github.com/repos/aam/Halide/commits{/sha}","git_commits_url":"https://api.github.com/repos/aam/Halide/git/commits{/sha}","comments_url":"https://api.github.com/repos/aam/Halide/comments{/number}","issue_comment_url":"https://api.github.com/repos/aam/Halide/issues/comments{/number}","contents_url":"https://api.github.com/repos/aam/Halide/contents/{+path}","compare_url":"https://api.github.com/repos/aam/Halide/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aam/Halide/merges","archive_url":"https://api.github.com/repos/aam/Halide/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aam/Halide/downloads","issues_url":"https://api.github.com/repos/aam/Halide/issues{/number}","pulls_url":"https://api.github.com/repos/aam/Halide/pulls{/number}","milestones_url":"https://api.github.com/repos/aam/Halide/milestones{/number}","notifications_url":"https://api.github.com/repos/aam/Halide/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aam/Halide/labels{/name}","releases_url":"https://api.github.com/repos/aam/Halide/releases{/id}","created_at":"2014-12-03T03:30:36Z","updated_at":"2015-04-02T21:50:47Z","pushed_at":"2015-04-06T17:47:00Z","git_url":"git://github.com/aam/Halide.git","ssh_url":"git@github.com:aam/Halide.git","clone_url":"https://github.com/aam/Halide.git","svn_url":"https://github.com/aam/Halide","homepage":"http://halide-lang.org","size":96413,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"halide:master","ref":"master","sha":"7e2e19b6294f38d9a8188e8decadc1ec59907baf","user":{"login":"halide","id":1548551,"avatar_url":"https://avatars.githubusercontent.com/u/1548551?v=3","gravatar_id":"","url":"https://api.github.com/users/halide","html_url":"https://github.com/halide","followers_url":"https://api.github.com/users/halide/followers","following_url":"https://api.github.com/users/halide/following{/other_user}","gists_url":"https://api.github.com/users/halide/gists{/gist_id}","starred_url":"https://api.github.com/users/halide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/halide/subscriptions","organizations_url":"https://api.github.com/users/halide/orgs","repos_url":"https://api.github.com/users/halide/repos","events_url":"https://api.github.com/users/halide/events{/privacy}","received_events_url":"https://api.github.com/users/halide/received_events","type":"Organization","site_admin":false},"repo":{"id":5241312,"name":"Halide","full_name":"halide/Halide","owner":{"login":"halide","id":1548551,"avatar_url":"https://avatars.githubusercontent.com/u/1548551?v=3","gravatar_id":"","url":"https://api.github.com/users/halide","html_url":"https://github.com/halide","followers_url":"https://api.github.com/users/halide/followers","following_url":"https://api.github.com/users/halide/following{/other_user}","gists_url":"https://api.github.com/users/halide/gists{/gist_id}","starred_url":"https://api.github.com/users/halide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/halide/subscriptions","organizations_url":"https://api.github.com/users/halide/orgs","repos_url":"https://api.github.com/users/halide/repos","events_url":"https://api.github.com/users/halide/events{/privacy}","received_events_url":"https://api.github.com/users/halide/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/halide/Halide","description":"a language for image processing and computational photography","fork":false,"url":"https://api.github.com/repos/halide/Halide","forks_url":"https://api.github.com/repos/halide/Halide/forks","keys_url":"https://api.github.com/repos/halide/Halide/keys{/key_id}","collaborators_url":"https://api.github.com/repos/halide/Halide/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/halide/Halide/teams","hooks_url":"https://api.github.com/repos/halide/Halide/hooks","issue_events_url":"https://api.github.com/repos/halide/Halide/issues/events{/number}","events_url":"https://api.github.com/repos/halide/Halide/events","assignees_url":"https://api.github.com/repos/halide/Halide/assignees{/user}","branches_url":"https://api.github.com/repos/halide/Halide/branches{/branch}","tags_url":"https://api.github.com/repos/halide/Halide/tags","blobs_url":"https://api.github.com/repos/halide/Halide/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/halide/Halide/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/halide/Halide/git/refs{/sha}","trees_url":"https://api.github.com/repos/halide/Halide/git/trees{/sha}","statuses_url":"https://api.github.com/repos/halide/Halide/statuses/{sha}","languages_url":"https://api.github.com/repos/halide/Halide/languages","stargazers_url":"https://api.github.com/repos/halide/Halide/stargazers","contributors_url":"https://api.github.com/repos/halide/Halide/contributors","subscribers_url":"https://api.github.com/repos/halide/Halide/subscribers","subscription_url":"https://api.github.com/repos/halide/Halide/subscription","commits_url":"https://api.github.com/repos/halide/Halide/commits{/sha}","git_commits_url":"https://api.github.com/repos/halide/Halide/git/commits{/sha}","comments_url":"https://api.github.com/repos/halide/Halide/comments{/number}","issue_comment_url":"https://api.github.com/repos/halide/Halide/issues/comments{/number}","contents_url":"https://api.github.com/repos/halide/Halide/contents/{+path}","compare_url":"https://api.github.com/repos/halide/Halide/compare/{base}...{head}","merges_url":"https://api.github.com/repos/halide/Halide/merges","archive_url":"https://api.github.com/repos/halide/Halide/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/halide/Halide/downloads","issues_url":"https://api.github.com/repos/halide/Halide/issues{/number}","pulls_url":"https://api.github.com/repos/halide/Halide/pulls{/number}","milestones_url":"https://api.github.com/repos/halide/Halide/milestones{/number}","notifications_url":"https://api.github.com/repos/halide/Halide/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/halide/Halide/labels{/name}","releases_url":"https://api.github.com/repos/halide/Halide/releases{/id}","created_at":"2012-07-31T04:05:25Z","updated_at":"2015-04-04T06:01:49Z","pushed_at":"2015-04-06T17:50:51Z","git_url":"git://github.com/halide/Halide.git","ssh_url":"git@github.com:halide/Halide.git","clone_url":"https://github.com/halide/Halide.git","svn_url":"https://github.com/halide/Halide","homepage":"http://halide-lang.org","size":113024,"stargazers_count":932,"watchers_count":932,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":162,"mirror_url":null,"open_issues_count":98,"forks":162,"open_issues":98,"watchers":932,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/halide/Halide/pulls/731"},"html":{"href":"https://github.com/halide/Halide/pull/731"},"issue":{"href":"https://api.github.com/repos/halide/Halide/issues/731"},"comments":{"href":"https://api.github.com/repos/halide/Halide/issues/731/comments"},"review_comments":{"href":"https://api.github.com/repos/halide/Halide/pulls/731/comments"},"review_comment":{"href":"https://api.github.com/repos/halide/Halide/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/halide/Halide/pulls/731/commits"},"statuses":{"href":"https://api.github.com/repos/halide/Halide/statuses/737a9b8159e731fe62c2a1f8bf5202cf70d773c7"}}}}