summary refs log tree commit diff
path: root/compiler/rustc_symbol_mangling/src/lib.rs
AgeCommit message (Collapse)AuthorLines
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.
2020-12-14Improve warnings on incompatible options involving -Zinstrument-coverageRich Kadel-1/+5
Adds checks for: * `no_core` attribute * explicitly-enabled `legacy` symbol mangling * mir_opt_level > 1 (which enables inlining) I removed code from the `Inline` MIR pass that forcibly disabled inlining if `-Zinstrument-coverage` was set. The default `mir_opt_level` does not enable inlining anyway. But if the level is explicitly set and is greater than 1, I issue a warning. The new warnings show up in tests, which is much better for diagnosing potential option conflicts in these cases.
2020-10-30Fix even more clippy warningsJoshua Nelson-16/+9
2020-10-15Replace target.target with target and target.ptr_width with target.pointer_widthest31-1/+1
Preparation for a subsequent change that replaces rustc_target::config::Config with its wrapped Target. On its own, this commit breaks the build. I don't like making build-breaking commits, but in this instance I believe that it makes review easier, as the "real" changes of this PR can be seen much more easily. Result of running: find compiler/ -type f -exec sed -i -e 's/target\.target\([)\.,; ]\)/target\1/g' {} \; find compiler/ -type f -exec sed -i -e 's/target\.target$/target/g' {} \; find compiler/ -type f -exec sed -i -e 's/target.ptr_width/target.pointer_width/g' {} \; ./x.py fmt
2020-09-23/nightly/nightly-rustcErik Hofmayer-1/+1
2020-09-23Updated html_root_url for compiler cratesErik Hofmayer-1/+1
2020-08-30mv compiler to compiler/mark-0/+268