about summary refs log tree commit diff
path: root/src/librustc_codegen_utils
AgeCommit message (Collapse)AuthorLines
2020-03-19Refactorings to begin getting rid of rustc_codegen_utilsMark Mansi-1752/+0
2020-03-18Rollup merge of #69920 - Centril:hir-cleanup, r=ZoxcMazdak Farrokhzad-5/+6
Remove some imports to the rustc crate - When we have `NestedVisitorMap::None`, we use `type Map = dyn intravisit::Map<'v>;` instead of the actual map. This doesn't actually result in dynamic dispatch (in the future we may want to use an associated type default to simplify the code). - Use `rustc_session::` imports instead of `rustc::{session, lint}`. r? @Zoxc
2020-03-17Auto merge of #69519 - 12101111:remove-proc-macro-check, r=nagisabors-1/+3
Don't use static crt by default when build proc-macro Don't check value of `crt-static` when build proc-macro crates, since they are always built dynamically. For more information, see https://github.com/rust-lang/cargo/issues/7563#issuecomment-591965320 I hope this will fix issues about compiling `proc_macro` crates on musl host without bring more issues. Fix https://github.com/rust-lang/cargo/issues/7563
2020-03-16use direct imports for `rustc::{lint, session}`.Mazdak Farrokhzad-5/+6
2020-03-06fix various typosMatthias Krüger-1/+1
2020-03-03Run format.12101111-1/+3
2020-03-03Don't use static crt by default when build proc-macro.12101111-1/+1
2020-02-29Rename `syntax` to `rustc_ast` in source codeVadim Petrochenkov-3/+3
2020-02-29Make it build againVadim Petrochenkov-1/+1
2020-02-27use char instead of &str for single char patternsMatthias Krüger-1/+1
2020-02-04Remove unused feature gates from cg_ssa and cg_utilsbjorn3-4/+0
2020-02-04Split `join_codegen_and_link()` into two stepsVictor Ding-1/+12
`join_codegen_and_link()` is split to `join_codegen()` and `link()`.
2020-01-25Rollup merge of #68111 - varkor:const-generics-type_name, r=oli-obkYuki Okushi-1/+1
Print constants in `type_name` for const generics Fixes https://github.com/rust-lang/rust/issues/65372. r? @oli-obk as there may have been a deliberate decision not to in https://github.com/rust-lang/rust/commit/5b9848912a85e28d000602fc2e81bad9c2f2a981#diff-4ed1a72c0bfdf17be769ed520932cd02R80.
2020-01-24Print constants in `type_name` for const genericsvarkor-1/+1
2020-01-23Add projection query for upstream drop-glue instances.Michael Woerister-22/+3
This reduces the amount of invalidated data when new types are add to upstream crates.
2020-01-20Make sure that all upstream generics get re-exported from Rust dylibs.Michael Woerister-36/+76
2020-01-05Remove rustc_hir reexports in rustc::hir.Mazdak Farrokhzad-7/+8
2020-01-04extract rustc::middle::codegen_fn_attrsMazdak Farrokhzad-1/+1
2020-01-02Normalize `syntax::symbol` imports.Mazdak Farrokhzad-4/+4
2020-01-01Rename `syntax_pos` to `rustc_span` in source codeVadim Petrochenkov-3/+3
2019-12-30Make things build againVadim Petrochenkov-1/+1
2019-12-24x.py fmt after previous deignoreMark Rousskov-74/+52
2019-12-22Format the worldMark Rousskov-153/+123
2019-12-21Use Arena inside hir::ImplItem.Camille GILLOT-1/+1
2019-12-21Use Arena inside hir::TraitItem.Camille GILLOT-1/+1
2019-12-21Use Arena inside hir::Item.Camille GILLOT-1/+1
2019-12-201. ast::Mutability::{Mutable -> Mut, Immutable -> Not}.Mazdak Farrokhzad-4/+4
2. mir::Mutability -> ast::Mutability.
2019-12-20Rollup merge of #67363 - alexcrichton:wasm-import-modules, r=eddybMazdak Farrokhzad-4/+24
Fix handling of wasm import modules and names The WebAssembly targets of rustc have weird issues around name mangling and import the same name from different modules. This all largely stems from the fact that we're using literal symbol names in LLVM IR to represent what a function is called when it's imported, and we're not using the wasm-specific `wasm-import-name` attribute. This in turn leads to two issues: * If, in the same codegen unit, the same FFI symbol is referenced twice then rustc, when translating to LLVM IR, will only reference one symbol from the first wasm module referenced. * There's also a bug in LLD [1] where even if two codegen units reference different modules, having the same symbol names means that LLD coalesces the symbols and only refers to one wasm module. Put another way, all our imported wasm symbols from the environment are keyed off their LLVM IR symbol name, which has lots of collisions today. This commit fixes the issue by implementing two changes: 1. All wasm symbols with `#[link(wasm_import_module = "...")]` are mangled by default in LLVM IR. This means they're all given unique names. 2. Symbols then use the `wasm-import-name` attribute to ensure that the WebAssembly file uses the correct import name. When put together this should ensure we don't trip over the LLD bug [1] and we also codegen IR correctly always referencing the right symbols with the right import module/name pairs. Closes #50021 Closes #56309 Closes #63562 [1]: https://bugs.llvm.org/show_bug.cgi?id=44316
2019-12-16Fix handling of wasm import modules and namesAlex Crichton-4/+24
The WebAssembly targets of rustc have weird issues around name mangling and import the same name from different modules. This all largely stems from the fact that we're using literal symbol names in LLVM IR to represent what a function is called when it's imported, and we're not using the wasm-specific `wasm-import-name` attribute. This in turn leads to two issues: * If, in the same codegen unit, the same FFI symbol is referenced twice then rustc, when translating to LLVM IR, will only reference one symbol from the first wasm module referenced. * There's also a bug in LLD [1] where even if two codegen units reference different modules, having the same symbol names means that LLD coalesces the symbols and only refers to one wasm module. Put another way, all our imported wasm symbols from the environment are keyed off their LLVM IR symbol name, which has lots of collisions today. This commit fixes the issue by implementing two changes: 1. All wasm symbols with `#[link(wasm_import_module = "...")]` are mangled by default in LLVM IR. This means they're all given unique names. 2. Symbols then use the `wasm-import-name` attribute to ensure that the WebAssembly file uses the correct import name. When put together this should ensure we don't trip over the LLD bug [1] and we also codegen IR correctly always referencing the right symbols with the right import module/name pairs. Closes #50021 Closes #56309 Closes #63562 [1]: https://bugs.llvm.org/show_bug.cgi?id=44316
2019-12-14Revert "Stabilize the `never_type`, written `!`."Niko Matsakis-1/+1
This reverts commit 15c30ddd69d6cc3fffe6d304c6dc968a5ed046f1.
2019-11-21Stabilize the `never_type`, written `!`.Mazdak Farrokhzad-1/+1
2019-11-20Rollup merge of #66060 - traxys:test_65401, r=michaelwoeristerMazdak Farrokhzad-3/+35
Making ICEs and test them in incremental This adds: - A way to make the compiler ICE - A way to check for ICE in `cfail` tests with `should-ice` - A regression test for issue #65401 I am not sure the attribute added `should-ice` is the best for this job
2019-11-12Rename in librustc_codegen_utils.Camille GILLOT-1/+1
2019-11-10Merge hir::Mutability into ast::Mutability.Camille GILLOT-4/+4
2019-11-06Rollup merge of #65776 - nnethercote:rename-LocalInternedString-and-more, ↵Mazdak Farrokhzad-2/+3
r=estebank Rename `LocalInternedString` and more This PR renames `LocalInternedString` as `SymbolStr`, removes an unnecessary `impl` from it, improves comments, and cleans up some `SymbolStr` uses. r? @estebank
2019-11-05rewrote error messages for #[rustc_error]Quentin Boyer-2/+8
2019-11-05rustc: remove "GlobalMetaData" dead code from hir::map::definitions.Eduard-Mihai Burtescu-2/+1
2019-11-03add rustc_error(delay_span_bug_from_inside_query) attributeQuentin Boyer-3/+29
2019-11-02Simplify various `Symbol` use points.Nicholas Nethercote-2/+3
Including removing a bunch of unnecessary `.as_str()` calls, and a bunch of unnecessary sigils.
2019-10-24rustc: Add a convenience alias for `dyn MetadataLoader + Sync`Vadim Petrochenkov-2/+2
2019-10-21Change `SymbolName::name` from `InternedString` to `Symbol`.Nicholas Nethercote-13/+10
This requires changing the `PartialOrd`/`Ord` implementations to look at the chars rather than the symbol index.
2019-10-21Convert fields within `DefPathData` from `InternedString` to `Symbol`.Nicholas Nethercote-1/+1
It's a full conversion, except in `DefKey::compute_stable_hash()` where a `Symbol` now is converted to an `InternedString` before being hashed. This was necessary to avoid test failures.
2019-10-13Add top level provide/provide_extern to cg_ssa and cg_utilsbjorn3-0/+5
2019-10-13Remove unused method CodegenBackend::diagnosticsbjorn3-1/+0
2019-10-04clean up GeneratorSubstscsmoe-2/+2
2019-09-29remove ClosureSubsts with SubstsRefcsmoe-2/+2
2019-09-28Switch over all StableHash impls to new formatMark Rousskov-2/+2
2019-09-26Auto merge of #64816 - Centril:rollup-gbeqot4, r=Centrilbors-2/+0
Rollup of 5 pull requests Successful merges: - #64221 ( Rust 2015: No longer downgrade NLL errors) - #64772 (Remove tx_to_llvm_workers from TyCtxt) - #64783 (Fix issue #64732) - #64787 (Fix ExitStatus on Fuchsia) - #64812 (Add test for E0543) Failed merges: r? @ghost
2019-09-26Rollup merge of #64772 - Mark-Simulacrum:no-tyctxt-tx, r=eddybMazdak Farrokhzad-2/+0
Remove tx_to_llvm_workers from TyCtxt This can be kept within the codegen backend crates entirely -- there's no reason for us to create it outside and attempt to hold it in the (global) context. Changes here aren't really too easily reviewable I suspect -- not sure if they can be cleaned up by splitting into more commits though, it's just hard to reason about `Box<Any>` in general. If there are thoughts though I'd be happy to hear them. The primary goal of this PR is to get rid of the field on `rustc_interface::Queries`.
2019-09-26Rename `subst::Kind` to `subst::GenericArg`varkor-13/+13