about summary refs log tree commit diff
path: root/compiler/rustc_symbol_mangling/src/lib.rs
AgeCommit message (Collapse)AuthorLines
2023-12-05rustc_symbol_mangling: Address all `rustc::potential_query_instability` lintsMartin Nordholts-1/+0
Instead of allowing `rustc::potential_query_instability` on the whole crate we go over each lint and allow it individually if it is safe to do. Turns out there were no instances of this lint in this crate.
2023-11-26merge `DefKind::Coroutine` into `DefKind::Closure`bohan-1/+1
2023-11-15Bump cfg(bootstrap)sMark Rousskov-3/+3
2023-10-27Rollup merge of #116834 - nnethercote:rustc_symbol_mangling, r=davidtwcoMatthias Krüger-4/+0
Remove `rustc_symbol_mangling/messages.ftl`. It contains a single message that (a) doesn't contain any natural language, and (b) is only used in tests. r? `@davidtwco`
2023-10-20s/Generator/Coroutine/Oli Scherer-1/+1
2023-10-17Remove `rustc_symbol_mangling/messages.ftl`.Nicholas Nethercote-4/+0
It contains a single message that (a) doesn't contain any natural language, and (b) is only used in tests.
2023-10-08rustdoc: remove rust logo from non-Rust cratesMichael Howell-0/+3
2023-09-14treat host effect params as erased generics in codegenDeadbeef-5/+4
This fixes the changes brought to codegen tests when effect params are added to libcore, by not attempting to monomorphize functions that get the host param by being `const fn`.
2023-08-09rustc: Move `stable_crate_id` from `Session` to `GlobalCtxt`Vadim Petrochenkov-1/+1
Removes a piece of mutable state. Follow up to #114578.
2023-07-14refactor(rustc_middle): Substs -> GenericArgMahdi Dibaiee-7/+7
2023-05-15Move expansion of query macros in rustc_middle to rustc_middle::queryJohn Kåre Alsaker-1/+1
2023-04-18Add `rustc_fluent_macro` to decouple fluent from `rustc_macros`Nilstrieb-1/+1
Fluent, with all the icu4x it brings in, takes quite some time to compile. `fluent_messages!` is only needed in further downstream rustc crates, but is blocking more upstream crates like `rustc_index`. By splitting it out, we allow `rustc_macros` to be compiled earlier, which speeds up `x check compiler` by about 5 seconds (and even more after the needless dependency on `serde_json` is removed from `rustc_data_structures`).
2023-03-11Simplify message pathsest31-1/+1
This makes it easier to open the messages file while developing on features. The commit was the result of automatted changes: for p in compiler/rustc_*; do mv $p/locales/en-US.ftl $p/messages.ftl; rmdir $p/locales; done for p in compiler/rustc_*; do sed -i "s#\.\./locales/en-US.ftl#../messages.ftl#" $p/src/lib.rs; done
2023-02-22errors: generate typed identifiers in each crateDavid Wood-0/+4
Instead of loading the Fluent resources for every crate in `rustc_error_messages`, each crate generates typed identifiers for its own diagnostics and creates a static which are pulled together in the `rustc_driver` crate and provided to the diagnostic emitter. Signed-off-by: David Wood <david.wood@huawei.com>
2023-02-16`if $c:expr { Some($r:expr) } else { None }` =>> `$c.then(|| $r)`Maybe Waffle-2/+1
2023-01-05Fix `uninlined_format_args` for some compiler cratesnils-2/+1
Convert all the crates that have had their diagnostic migration completed (except save_analysis because that will be deleted soon and apfloat because of the licensing problem).
2022-09-01Always import all tracing macros for the entire crate instead of piecemeal ↵Oli Scherer-2/+3
by module
2022-08-30ADD - diagnostics lints to symbol_mangling moduleJhonny Bill Mena-0/+2
2022-08-30ADD - InvalidSymbolName to migrate symbol-name({}) error to new diagnostics ↵Jhonny Bill Mena-0/+1
infraestructure ADD - dependencies needed to port a module to new Diagnostics infra (rustc_macros, rustc_errors, errors file, and fluent file)
2022-07-23Add fine-grained LLVM CFI support to the Rust compilerRamon de C Valle-7/+2
This commit improves the LLVM Control Flow Integrity (CFI) support in the Rust compiler by providing forward-edge control flow protection for Rust-compiled code only by aggregating function pointers in groups identified by their return and parameter types. Forward-edge control flow protection for C or C++ and Rust -compiled code "mixed binaries" (i.e., for when C or C++ and Rust -compiled code share the same virtual address space) will be provided in later work as part of this project by identifying C char and integer type uses at the time types are encoded (see Type metadata in the design document in the tracking issue #89653). LLVM CFI can be enabled with -Zsanitizer=cfi and requires LTO (i.e., -Clto).
2022-06-14Add typeid_for_trait_ref functionflip1995-0/+7
This function computes a Itanium-like typeid for a trait_ref. This is required for the VFE optimization in LLVM. It is used to map `llvm.type.checked.load` invocations, that is loading the function from a vtable, to the vtables this function could be from. It is important to note that `typeid`s are not unique. So multiple vtables of the same trait can share `typeid`s.
2022-06-03Fully stabilize NLLJack Huey-1/+0
2022-05-09reviewlcnr-1/+1
2022-05-09only compute `codegen_fn_attrs` where neededlcnr-14/+25
2022-04-10Do not access HIR to compute symbol_name.Camille GILLOT-8/+4
2022-03-16resolve the conflict in compiler/rustc_session/src/parse.rscodehorseman-1/+1
Signed-off-by: codehorseman <cricis@yeah.net>
2022-02-25Switch bootstrap cfgsMark Rousskov-1/+1
2022-02-01add a rustc::query_stability lintlcnr-0/+1
2022-01-15Reduce use of local_def_id_to_hir_id.Camille GILLOT-2/+1
2022-01-01Update references to `-Z symbol-mangling-version` to use `-C`Josh Triplett-1/+1
Replace `-Z symbol-mangling-version=v0` with `-C symbol-mangling-version=v0`. Replace `-Z symbol-mangling-version=legacy` with `-Z unstable-options -C symbol-mangling-version=legacy`.
2022-01-01Stabilize -Z symbol-mangling-version as -C symbol-mangling-versionJosh Triplett-1/+1
This allows selecting `v0` symbol-mangling without an unstable option. Selecting `legacy` still requires -Z unstable-options. Continue supporting -Z symbol-mangling-version for compatibility for now, but show a deprecation warning for it.
2021-12-15Remove `in_band_lifetimes` from `rustc_symbol_mangling`Sylvan Bowdler-5/+4
2021-12-14Stabilize iter::zip.PFPoitras-1/+0
2021-10-28Revert "Add rustc lint, warning when iterating over hashmaps"Mark Rousskov-1/+0
2021-10-27Auto merge of #89652 - rcvalle:rust-cfi, r=nagisabors-1/+7
Add LLVM CFI support to the Rust compiler This PR adds LLVM Control Flow Integrity (CFI) support to the Rust compiler. It initially provides forward-edge control flow protection for Rust-compiled code only by aggregating function pointers in groups identified by their number of arguments. Forward-edge control flow protection for C or C++ and Rust -compiled code "mixed binaries" (i.e., for when C or C++ and Rust -compiled code share the same virtual address space) will be provided in later work as part of this project by defining and using compatible type identifiers (see Type metadata in the design document in the tracking issue #89653). LLVM CFI can be enabled with -Zsanitizer=cfi and requires LTO (i.e., -Clto). Thank you, `@eddyb` and `@pcc,` for all the help!
2021-10-25Add LLVM CFI support to the Rust compilerRamon de C Valle-1/+7
This commit adds LLVM Control Flow Integrity (CFI) support to the Rust compiler. It initially provides forward-edge control flow protection for Rust-compiled code only by aggregating function pointers in groups identified by their number of arguments. Forward-edge control flow protection for C or C++ and Rust -compiled code "mixed binaries" (i.e., for when C or C++ and Rust -compiled code share the same virtual address space) will be provided in later work as part of this project by defining and using compatible type identifiers (see Type metadata in the design document in the tracking issue #89653). LLVM CFI can be enabled with -Zsanitizer=cfi and requires LTO (i.e., -Clto).
2021-10-15allow `potential_query_instability` everywherelcnr-0/+1
2021-08-29Rollup merge of #85534 - csmoe:demagnle-assert, r=michaelwoeristerGuillaume Gomez-2/+10
add rustc-demangle assertion on mangled symbol cc https://github.com/rust-lang/rust/issues/60705#issuecomment-844880365 r? `@michaelwoerister`
2021-08-27add rustc-demangle assertion on mangled symbolcsmoe-2/+10
2021-08-24rustc_symbol_mangling: support structural constants and &str in v0.Eduard-Mihai Burtescu-0/+1
2021-08-10Replace #[plugin_registrar] with exporting __rustc_plugin_registrarbjorn3-4/+0
2021-07-06Revert "Revert "Merge CrateDisambiguator into StableCrateId""bjorn3-4/+4
This reverts commit 8176ab8bc18fdd7d3c2cf7f720c51166364c33a3.
2021-06-07Revert "Merge CrateDisambiguator into StableCrateId"bjorn3-4/+4
This reverts commit d0ec85d3fb6d322496cb8f4bc1c21e19f23284ad.
2021-05-30Merge CrateDisambiguator into StableCrateIdbjorn3-4/+4
2021-05-24remove cfg(bootstrap)Pietro Albini-1/+0
2021-05-12Use () for proc_macro_decls_static.Camille GILLOT-1/+1
2021-05-12Use () for plugin_registrar_fn.Camille GILLOT-1/+1
2021-04-04wasm64Gus Caplan-1/+1
2021-03-19stabilize or_patternsmark-1/+1
2020-12-14Convenience funcs for `some_option.unwrap_or(...)`Rich Kadel-5/+1
This ensures consistent handling of default values for options that are None if not specified on the command line.