Skip to content

Please rebase bundled LLVM to 3.4 #11371

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

Closed
lucab opened this issue Jan 7, 2014 · 3 comments
Closed

Please rebase bundled LLVM to 3.4 #11371

lucab opened this issue Jan 7, 2014 · 3 comments
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.

Comments

@lucab
Copy link
Contributor

lucab commented Jan 7, 2014

LLVM 3.4 has just been released. It would be good to partially realign and rebase our patches on the 3.4 tag (before tagging 0.9?).

@lucab
Copy link
Contributor Author

lucab commented Jan 7, 2014

cc @luqmana who is the current submodule owner.

@alexcrichton
Copy link
Member

I'm not sure if there's much for us to do on this front, the version of LLVM that we're using is tagged as 3.5-svn, (last committed to by LLVM on 12/27/12), so we're not terribly behind the current release. Updating LLVM is still a bit of a pain now, and there's still no ability to use a system LLVM (because still have non-upstreamed patches), so I would be surprised if this happened before 0.9.

@alexcrichton
Copy link
Member

We've rebased LLVM to master recently (#11853)

flip1995 pushed a commit to flip1995/rust that referenced this issue Sep 7, 2023
[`unnecessary_unwrap`]: lint on `.as_ref().unwrap()`

Closes rust-lang#11371

This turned out to be a little more code than I originally thought, because the lint also makes sure to not lint if the user tries to mutate the option:
```rs
if option.is_some() {
  option = None;
  option.unwrap(); // don't lint here
}
```
... which means that even if we taught this lint to recognize `.as_mut()`, it would *still* not lint because that would count as a mutation. So we need to allow `.as_mut()` calls but reject other kinds of mutations.
Unfortunately it doesn't look like this is possible with `is_potentially_mutated` (seeing what kind of mutation happened).
This replaces it with a custom little visitor that does basically what it did before, but also allows `.as_mut()`.

changelog: [`unnecessary_unwrap`]: lint on `.as_ref().unwrap()`
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.
Projects
None yet
Development

No branches or pull requests

2 participants