summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src/lib.rs
AgeCommit message (Collapse)AuthorLines
2022-05-05Auto merge of #91779 - ridwanabdillahi:natvis, r=michaelwoeristerbors-0/+2
Add a new Rust attribute to support embedding debugger visualizers Implemented [this RFC](https://github.com/rust-lang/rfcs/pull/3191) to add support for embedding debugger visualizers into a PDB. Added a new attribute `#[debugger_visualizer]` and updated the `CrateMetadata` to store debugger visualizers for crate dependencies. RFC: https://github.com/rust-lang/rfcs/pull/3191
2022-05-04Stabilize `bool::then_some`Josh Triplett-1/+0
2022-05-03Add support for a new attribute `#[debugger_visualizer]` to support ↵ridwanabdillahi-0/+2
embedding debugger visualizers into a generated PDB. Cleanup `DebuggerVisualizerFile` type and other minor cleanup of queries. Merge the queries for debugger visualizers into a single query. Revert move of `resolve_path` to `rustc_builtin_macros`. Update dependencies in Cargo.toml for `rustc_passes`. Respond to PR comments. Load visualizer files into opaque bytes `Vec<u8>`. Debugger visualizers for dynamically linked crates should not be embedded in the current crate. Update the unstable book with the new feature. Add the tracking issue for the debugger_visualizer feature. Respond to PR comments and minor cleanups.
2022-04-27Use decorated names for linked_symbols on WindowsGary Guo-0/+1
2022-04-25Auto merge of #95604 - nbdd0121:used2, r=petrochenkovbors-0/+2
Generate synthetic object file to ensure all exported and used symbols participate in the linking Fix #50007 and #47384 This is the synthetic object file approach that I described in https://github.com/rust-lang/rust/pull/95363#issuecomment-1079932354, allowing all exported and used symbols to be linked while still allowing them to be GCed. Related #93791, #95363 r? `@petrochenkov` cc `@carbotaniuman`
2022-04-18Synthesis object file for `#[used]` and exported symbolsGary Guo-0/+2
2022-04-08check_doc_keyword: don't alloc string for emptiness checkklensy-1/+1
check_doc_alias_value: get argument as Symbol to prevent needless string convertions check_doc_attrs: don't alloc vec, iterate over slice. Vec introduced in #83149, but no perf run posted on merge replace as_str() check with symbol check get_single_str_from_tts: don't prealloc string trivial string to str replace LifetimeScopeForPath::NonElided use Vec<Symbol> instead of Vec<String> AssertModuleSource use BTreeSet<Symbol> instead of BTreeSet<String> CrateInfo.crate_name replace FxHashMap<CrateNum, String> with FxHashMap<CrateNum, Symbol>
2022-04-02Address review comments and add a testJakub Beránek-4/+24
2022-04-02Include a header in .rlink files to provide nicer error messages when a ↵Jakub Beránek-0/+31
wrong file is parsed as .rlink
2022-03-29Make some rustc code conform to strict provenance.Aria Beingessner-0/+1
There's some really bad stuff around `ty` and pointer tagging stuff that was too much work to handle here.
2022-02-25Switch bootstrap cfgsMark Rousskov-1/+1
2022-02-01add a rustc::query_stability lintlcnr-0/+1
2021-12-15Remove `in_band_lifetimes` from `rustc_codegen_ssa`LegionMammal978-1/+0
See #91867 for more information.
2021-10-28Revert "Add rustc lint, warning when iterating over hashmaps"Mark Rousskov-1/+0
2021-10-25Avoid a branch on key being local for queries that use the same local and ↵bjorn3-2/+2
extern providers
2021-10-24Rollup merge of #89558 - lcnr:query-stable-lint, r=estebankMatthias Krüger-0/+1
Add rustc lint, warning when iterating over hashmaps r? rust-lang/wg-incr-comp
2021-10-16Adopt let_else across the compilerest31-0/+1
This performs a substitution of code following the pattern: let <id> = if let <pat> = ... { identity } else { ... : ! }; To simplify it to: let <pat> = ... { identity } else { ... : ! }; By adopting the let_else feature.
2021-10-15allow `potential_query_instability` everywherelcnr-0/+1
2021-10-03Move rustc_middle::middle::cstore to rustc_session.Camille GILLOT-1/+1
2021-09-30Move EncodedMetadata to rustc_metadata.Camille GILLOT-1/+1
2021-08-30Fix handling of +whole-archive native link modifier.Michael Woerister-0/+1
2021-07-06Fold LinkerInfo into CrateInfobjorn3-2/+3
2021-07-06Remove unused panic_runtime field from CrateInfobjorn3-1/+0
2021-07-06Move LinkerInfo into CrateInfobjorn3-1/+1
2021-07-05Remove LibSourcebjorn3-3/+2
The information is stored in used_crate_source too anyway
2021-06-07Auto merge of #85810 - bjorn3:further_driver_cleanup, r=varkorbors-2/+2
Driver improvements This PR contains a couple of cleanups for the driver and a few small improvements for the custom codegen backend interface. It also implements `--version` and `-Cpasses=list` support for custom codegen backends.
2021-06-04Add first cut of functionality for #58713: support for #[link(kind = ↵Richard Cobbe-1/+8
"raw-dylib")]. This does not yet support #[link_name] attributes on functions, the #[link_ordinal] attribute, #[link(kind = "raw-dylib")] on extern blocks in bin crates, or stdcall functions on 32-bit x86.
2021-06-04Move crate_name field from OngoingCodegen to CrateInfobjorn3-1/+1
2021-06-04Move windows_subsystem field from CodegenResults to CrateInfobjorn3-1/+1
2021-05-31Remove unused feature gatesbjorn3-4/+0
2021-05-24remove cfg(bootstrap)Pietro Albini-1/+0
2021-05-05Implement RFC 2951: Native link modifiersLuqman Aden-1/+2
This commit implements both the native linking modifiers infrastructure as well as an initial attempt at the individual modifiers from the RFC. It also introduces a feature flag for the general syntax along with individual feature flags for each modifier.
2021-04-03Remove attribute `#[link_args]`Vadim Petrochenkov-1/+0
2021-03-26Use iter::zip in compiler/Josh Stone-0/+1
2021-03-19stabilize or_patternsmark-1/+1
2021-03-18Remove unwrap_none/expect_none from compiler/.Mara Bos-1/+1
2021-03-09Build StKind::CopyOverlappingkadmin-0/+1
This replaces where it was previously being constructed in intrinsics, with direct construction of the Statement.
2021-01-23Don't provide backend_optimization_level query for extern cratesbjorn3-2/+1
2020-12-29don't clone copy typesMatthias Krüger-1/+1
2020-12-23Exclude unnecessary info from CodegenResultsVictor Ding-3/+18
`foreign_module` and `wasm_import_module` are not needed for linking, and hence can be removed from CodegenResults.
2020-12-16cg_llvm: implement split dwarf supportDavid Wood-1/+4
This commit implements Split DWARF support, wiring up the flag (added in earlier commits) to the modified FFI wrapper (also from earlier commits). Signed-off-by: David Wood <david@davidtw.co>
2020-12-03Combination of commitsRich Kadel-0/+1
Fixes multiple issue with counters, with simplification Includes a change to the implicit else span in ast_lowering, so coverage of the implicit else no longer spans the `then` block. Adds coverage for unused closures and async function bodies. Fixes: #78542 Adding unreachable regions for known MIR missing from coverage map Cleaned up PR commits, and removed link-dead-code requirement and tests Coverage no longer depends on Issue #76038 (`-C link-dead-code` is no longer needed or enforced, so MSVC can use the same tests as Linux and MacOS now) Restrict adding unreachable regions to covered files Improved the code that adds coverage for uncalled functions (with MIR but not-codegenned) to avoid generating coverage in files not already included in the files with covered functions. Resolved last known issue requiring --emit llvm-ir workaround Fixed bugs in how unreachable code spans were added.
2020-10-10Move finalize_session_directory call out of cg_llvmbjorn3-2/+0
This causes it to be called even when passing `-Zno-link`, when linking fails or when neither `--emit link` nor `--emit metadata` is used.
2020-10-09Move supported_target_features query provider to cg_ssabjorn3-0/+1
2020-10-04Move target feature whitelist from cg_llvm to cg_ssabjorn3-0/+1
These target features have to be supported or at least emulated by alternative codegen backends anyway as they are used by common crates. By moving this list to cg_ssa, other codegen backends don't have to copy this code.
2020-09-26Rollup merge of #77161 - est31:swich_len_already_trusted, r=petrochenkovRalf Jung-1/+0
Remove TrustedLen requirement from BuilderMethods::switch The main use case of TrustedLen is allowing APIs to specialize on it, but no use of it uses that specialization. Instead, only the .len() function provided by ExactSizeIterator is used, which is already required to be accurate. Thus, the TrustedLen requirement on BuilderMethods::switch is redundant.
2020-09-24Remove TrustedLen requirement from BuilderMethods::switchest31-1/+0
The main use case of TrustedLen is allowing APIs to specialize on it, but no use of it uses that specialization. Instead, only the .len() function provided by ExactSizeIterator is used, which is already required to be accurate. Thus, the TrustedLen requirement on BuilderMethods::switch is redundant.
2020-09-23/nightly/nightly-rustcErik Hofmayer-1/+1
2020-09-23Updated html_root_url for compiler cratesErik Hofmayer-1/+1
2020-09-17Remove redundant #![feature(...)] 's from compiler/est31-2/+0