Skip to content
New issue

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

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Remove librustc_codegen_utils. #45276

Closed
eddyb opened this issue Oct 14, 2017 · 4 comments
Closed

Remove librustc_codegen_utils. #45276

eddyb opened this issue Oct 14, 2017 · 4 comments
Labels
A-codegen Area: Code generation C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@eddyb
Copy link
Member

eddyb commented Oct 14, 2017

Added by #44085, doesn't serve a real purpose. Common utility functions belong in librustc.

@eddyb
Copy link
Member Author

eddyb commented Oct 23, 2017

Second offender: #45381.

bors added a commit that referenced this issue Dec 19, 2017
Move collector to librustc_mir::monomorphize

cc #44334 and #45276

* I moved the collector to rustc_mir

*  I renamed `TransItem` to `MonoItem`. _(I still need to fix up comments and variable names)_

* I got rid of `common.rs` and `monomorphize.rs` from `librustc_trans_utils`. I moved most of the functionality into `TyCtxt`. I realized that the `librustc_trans_utils::common.rs` was just copy pasted from `librustc_trans::common.rs`.

Should I also get rid of the `librustc_trans::common.rs` in this PR? Most of the functionality seems a bit useless, I decided to put some of it into `TyCtxt` but maybe that is not the correct action here.

Should I also get rid of `librustc_trans_utils` completely here? Or should I do it in a separate PR?
@XAMPPRocky XAMPPRocky added C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 22, 2018
@kzys
Copy link
Contributor

kzys commented Oct 10, 2018

Seems we don't have librustc_trans_utils anymore?

@eddyb eddyb changed the title Remove librustc_trans_utils. Remove librustc_codegen_utils. Nov 4, 2018
@eddyb
Copy link
Member Author

eddyb commented Nov 4, 2018

@kzys It got renamed in the meanwhile.

@jonas-schievink jonas-schievink added the A-codegen Area: Code generation label Mar 12, 2020
Centril added a commit to Centril/rust that referenced this issue Mar 21, 2020
Refactorings to get rid of rustc_codegen_utils

r? @eddyb

cc rust-lang#45276

After this, the only modules left in `rustc_codegen_utils` are
- `link`: a bunch of linking-related functions (many dealing with file names). These are mostly consumed by save analysis, rustc_driver, rustc_interface, and of course codegen. I assume they live here because we don't want a dependency of save analysis on codegen... Perhaps they can be moved to librustc?
- ~`symbol_names` and `symbol_names_test`: honestly it seems odd that `symbol_names_test` is not a submodule of `symbol_names`. It seems like these could honestly live in their own crate or move to librustc. Already name mangling is exported as the `symbol_name` query.~ (move it to its own crate)

I don't mind doing either of the above as part of this PR or a followup if you want.
@cjgillot
Copy link
Contributor

I believe this should be closed by #69965

@jyn514 jyn514 closed this as completed Oct 13, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-codegen Area: Code generation C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

6 participants