Skip to content
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 and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

llvm-wrapper: fix few warnings #121389

Merged
merged 2 commits into from
Feb 26, 2024
Merged

llvm-wrapper: fix few warnings #121389

merged 2 commits into from
Feb 26, 2024

Conversation

klensy
Copy link
Contributor

@klensy klensy commented Feb 21, 2024

Two fixes: first one is simple unsigned -> uint64_t, but how second one is more subtile, see commit description.

llvm-wrapper/ArchiveWrapper.cpp(70): warning C4305: 'argument': truncation from 'int' to 'bool'
while in llvm 12 signature was
 static ErrorOr<std::unique_ptr<MemoryBuffer>> getFile(const Twine &Filename, int64_t FileSize = -1, bool RequiresNullTerminator = true, bool IsVolatile = false);
https://github.com/llvm/llvm-project/blame/fed41342a82f5a3a9201819a82bf7a48313e296b/llvm/include/llvm/Support/MemoryBuffer.h#L85-L87

in llvm 13 and later it was changed to
static ErrorOr<std::unique_ptr<MemoryBuffer>> getFile(const Twine &Filename, bool IsText = false, bool RequiresNullTerminator = true, bool IsVolatile = false);
https://github.com/llvm/llvm-project/blame/75e33f71c2dae584b13a7d1186ae0a038ba98838/llvm/include/llvm/Support/MemoryBuffer.h#L86-L88

so code was interpreted as MemoryBuffer::getFile(Path, /*IsText*/true, /*RequiresNullTerminator=*/false), but now will be MemoryBuffer::getFile(Path, /*IsText*/false, /*RequiresNullTerminator=*/false). How that worked before?
@rustbot
Copy link
Collaborator

rustbot commented Feb 21, 2024

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 Feb 21, 2024
@klensy
Copy link
Contributor Author

klensy commented Feb 23, 2024

r? @nikic

@rustbot rustbot assigned nikic and unassigned cjgillot Feb 23, 2024
@nikic
Copy link
Contributor

nikic commented Feb 26, 2024

@bors r+

@bors
Copy link
Contributor

bors commented Feb 26, 2024

📌 Commit 0ce966f has been approved by nikic

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 Feb 26, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 26, 2024
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#121389 (llvm-wrapper: fix few warnings)
 - rust-lang#121493 (By changing some attributes to only_local, reducing encoding attributes in the crate metadate.)
 - rust-lang#121615 (Move `emit_stashed_diagnostic` call in rustfmt.)
 - rust-lang#121617 (Actually use the right closure kind when checking async Fn goals)
 - rust-lang#121628 (Do not const prop unions)
 - rust-lang#121629 (fix some references to no-longer-existing ReprOptions.layout_seed)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 6700714 into rust-lang:master Feb 26, 2024
11 checks passed
@rustbot rustbot added this to the 1.78.0 milestone Feb 26, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Feb 26, 2024
Rollup merge of rust-lang#121389 - klensy:llvm-warn-fix, r=nikic

llvm-wrapper: fix few warnings

Two fixes: first one is simple unsigned -> uint64_t, but how second one is more subtile, see commit description.
calebcartwright pushed a commit to calebcartwright/rust that referenced this pull request Jun 22, 2024
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#121389 (llvm-wrapper: fix few warnings)
 - rust-lang#121493 (By changing some attributes to only_local, reducing encoding attributes in the crate metadate.)
 - rust-lang#121615 (Move `emit_stashed_diagnostic` call in rustfmt.)
 - rust-lang#121617 (Actually use the right closure kind when checking async Fn goals)
 - rust-lang#121628 (Do not const prop unions)
 - rust-lang#121629 (fix some references to no-longer-existing ReprOptions.layout_seed)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants