Skip to content

cg_llvm: Use LLVMGlobalAddMetadata from LLVM-C - #163697

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
Zalathar:llvm-22
Oct 5, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
Zalathar:llvm-22

Conversation

@Zalathar

@Zalathar Zalathar commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

LLVMGlobalAddMetadata was introduced in LLVM 22, so now that that's our baseline, we can bind to it directly and remove our own C++ wrapper.

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 3, 2026
@rustbot

rustbot commented Oct 3, 2026

Copy link
Copy Markdown
Collaborator

r? @mejrs

rustbot has assigned @mejrs.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 77 candidates
  • Random selection from 18 candidates

@mejrs

mejrs commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

LLVMGetOrInsertFunction has been implemented in #163690

@rust-bors

This comment has been minimized.

This function was added in LLVM 22.
@rustbot

rustbot commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@Zalathar Zalathar changed the title cg_llvm: Use some LLVM-C functions that require LLVM 22 cg_llvm: Use LLVMGlobalAddMetadata from LLVM-C Oct 5, 2026
@Zalathar

Zalathar commented Oct 5, 2026 •

Copy link
Copy Markdown
Member Author

Dropped the LLVMGetOrInsertFunction part (since #163690 is already merged), and narrowed this PR to just LLVMGlobalAddMetadata.

@rustbot ready

@mejrs mejrs left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rust-bors

rust-bors Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 58eda6e has been approved by mejrs

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 5, 2026
rust-bors Bot pushed a commit that referenced this pull request Oct 5, 2026
…uwer

Rollup of 4 pull requests

Successful merges:

 - #163790 (miri subtree update)
 - #163610 (optimize empty `NestedGoals::extend_from_child`)
 - #163697 (cg_llvm: Use `LLVMGlobalAddMetadata` from LLVM-C)
 - #163750 (lower spans of error const args and test binder bounds)
@rust-bors
rust-bors Bot merged commit 8a50d50 into rust-lang:main Oct 5, 2026
14 checks passed
@rustbot rustbot added this to the 1.101.0 milestone Oct 5, 2026
rust-bors Bot pushed a commit that referenced this pull request Oct 5, 2026
Rollup merge of #163697 - Zalathar:llvm-22, r=mejrs

cg_llvm: Use `LLVMGlobalAddMetadata` from LLVM-C

- Follow-up to #163572
---

`LLVMGlobalAddMetadata` was introduced in LLVM 22, so now that that's our baseline, we can bind to it directly and remove our own C++ wrapper.
@Zalathar
Zalathar deleted the llvm-22 branch October 6, 2026 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants