Make llvm::set_section take a &CStr by Zalathar · Pull Request #131962 · rust-lang/rust (original) (raw)

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation4 Commits1 Checks6 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

Zalathar

There's no reason to convert the section name to an intermediate String, when the LLVM-C API wants a C string anyway.

Follow-up to #131876.

@Zalathar

@rustbot

r? @cjgillot

rustbot has assigned @cjgillot.
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

@rustbot rustbot added 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 20, 2024

@Zalathar

Note to self: After this and #131956 land, try moving all the coverage-specific LLVM wrapper functions out of coverageinfo and into a separate llvm_cov submodule

Swatinem

@workingjubilee

This patch looks familiar. :^)

@bors r=Swatinem,workingjubilee

@bors

📌 Commit 3310419 has been approved by Swatinem,workingjubilee

It is now in the queue for this repository.

@bors bors 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 20, 2024

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request

Oct 20, 2024

@matthiaskrgr

…nem,workingjubilee

Make llvm::set_section take a &CStr

There's no reason to convert the section name to an intermediate String, when the LLVM-C API wants a C string anyway.

Follow-up to rust-lang#131876.

bors added a commit to rust-lang-ci/rust that referenced this pull request

Oct 20, 2024

@bors

…iaskrgr

Rollup of 3 pull requests

Successful merges:

Failed merges:

r? @ghost @rustbot modify labels: rollup

bors added a commit to rust-lang-ci/rust that referenced this pull request

Oct 20, 2024

@bors

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request

Oct 20, 2024

@rust-timer

Rollup merge of rust-lang#131962 - Zalathar:llvm-set-section, r=Swatinem,workingjubilee

Make llvm::set_section take a &CStr

There's no reason to convert the section name to an intermediate String, when the LLVM-C API wants a C string anyway.

Follow-up to rust-lang#131876.

This was referenced

Oct 25, 2024

workingjubilee added a commit to workingjubilee/rustc that referenced this pull request

Oct 30, 2024

@workingjubilee

…rrors

cg_llvm: Consistently use safe wrapper function set_section

Follow-up to rust-lang#131962 and rust-lang#132260 (comment).

To avoid too much scope creep, I've deliberately kept the changes to LLVMRustGetSliceFromObjectDataByName as minimal as possible.

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request

Oct 30, 2024

@matthiaskrgr

…rrors

cg_llvm: Consistently use safe wrapper function set_section

Follow-up to rust-lang#131962 and rust-lang#132260 (comment).

To avoid too much scope creep, I've deliberately kept the changes to LLVMRustGetSliceFromObjectDataByName as minimal as possible.

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request

Oct 30, 2024

@rust-timer

Rollup merge of rust-lang#132340 - Zalathar:set-section, r=compiler-errors

cg_llvm: Consistently use safe wrapper function set_section

Follow-up to rust-lang#131962 and rust-lang#132260 (comment).

To avoid too much scope creep, I've deliberately kept the changes to LLVMRustGetSliceFromObjectDataByName as minimal as possible.

Labels

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.