-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Several changes to the codegen backend organization #65340
Conversation
Some changes occurred in diagnostic error codes |
r? @cramertj (rust_highfive has picked a reviewer for you, use r? to override) |
r? @eddyb I'll look into this ASAP (please ping me elsewhere otherwise) |
src/librustc_codegen_llvm/common.rs
Outdated
@@ -86,6 +86,8 @@ impl Funclet<'ll> { | |||
|
|||
impl BackendTypes for CodegenCx<'ll, 'tcx> { | |||
type Value = &'ll Value; | |||
type FuncId = &'ll Value; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should have a newtype of Value
to force this to be correctly typed (LLVM has a class for functions which IIRC is a subclass of GlobalValue
). But this is a low-priority cleanup.
@@ -34,7 +34,7 @@ pub trait BuilderMethods<'a, 'tcx>: | |||
+ HasTargetSpec | |||
|
|||
{ | |||
fn new_block<'b>(cx: &'a Self::CodegenCx, llfn: Self::Value, name: &'b str) -> Self; | |||
fn new_block<'b>(cx: &'a Self::CodegenCx, llfn: Self::FuncId, name: &'b str) -> Self; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At some point we'll have to replace all of these ll
prefixes in variable names.
☔ The latest upstream changes (presumably #65182) made this pull request unmergeable. Please resolve the merge conflicts. |
The associated long diagnostic didn't get registered before
1711aba
to
f0e2fc7
Compare
@bors r+ |
📌 Commit f0e2fc7 has been approved by |
Several changes to the codegen backend organization * Split functions from values in cg_ssa `BackendTypes`. * Remove `is_const_integral` function from `ConstMethods`. * Actually register the invalid monomorphization of intrinsic long diagnostic and remove the `diagnostics` method from `CodegenBackends`, as it was unused. * Add cg_ssa and cg_utils provided methods to `default_provide`, so codegen backend don't have to do it themself.
Rollup of 10 pull requests Successful merges: - #65170 (rustc_metadata: Privatize private code and remove dead code) - #65260 (Optimize `LexicalResolve::expansion`.) - #65261 (Remove `Option` from `TokenStream`) - #65332 (std::fmt: reorder docs) - #65340 (Several changes to the codegen backend organization) - #65365 (Include const generic arguments in metadata) - #65398 (Bring attention to suggestions when the only difference is capitalization) - #65410 (syntax: add parser recovery for intersection- / and-patterns `p1 @ p2`) - #65415 (Remove an outdated test output file) - #65416 (Minor sync changes) Failed merges: r? @ghost
BackendTypes
.is_const_integral
function fromConstMethods
.diagnostics
method fromCodegenBackends
, as it was unused.default_provide
, so codegen backend don't have to do it themself.