rust/compiler/rustc_codegen_ssa/src
Jubilee 992aa1edb6
Rollup merge of #122879 - maurer:callsite-instances, r=workingjubilee
CFI: Strip auto traits off Virtual calls

We already use `Instance` at declaration sites when available to glean additional information about possible abstractions of the type in use. This does the same when possible at callsites as well.

The primary purpose of this change is to allow CFI to alter how it generates type information for indirect calls through `Virtual` instances.

This is needed for the "separate machinery" version of my approach to the vtable issues (#122573), because we need to respond differently to a `Virtual` call to the same type as a non-virtual call, specifically [stripping auto traits off the receiver's `Self`](54b15b0c36) because there isn't a separate vtable for `Foo` vs `Foo + Send`.

This would also make a more general underlying mechanism that could be used by rcvalle's [proposed drop detection / encoding](edcd1e20a1) if we end up using his approach, as we could condition out on the `def_id` in the CFI code rather than requiring the generating code to explicitly note whether it was calling drop.
2024-03-23 22:59:42 -07:00
..
back Update comment and remove special-case for Wasm targets which is incompatible with response-file changes 2024-03-20 23:38:15 +00:00
debuginfo Programmatically convert some of the pat ctors 2024-03-22 11:13:29 -04:00
mir Rollup merge of #122879 - maurer:callsite-instances, r=workingjubilee 2024-03-23 22:59:42 -07:00
traits CFI: Use Instance at callsites 2024-03-23 18:30:39 +00:00
assert_module_sources.rs Rename IntoDiagnosticArg as IntoDiagArg. 2024-03-11 09:12:19 +11:00
base.rs CFI: Use Instance at callsites 2024-03-23 18:30:39 +00:00
codegen_attrs.rs Fix misleading message when using a named constant as a struct alignment/pack 2024-03-02 23:15:39 +08:00
common.rs Handle calls to upstream monomorphizations in compiler_builtins 2024-03-16 15:22:05 -04:00
errors.rs Handle calls to upstream monomorphizations in compiler_builtins 2024-03-16 15:22:05 -04:00
lib.rs Stabilize associated type bounds 2024-03-08 20:56:25 +00:00
meth.rs use ptradd for vtable indexing 2024-03-10 22:47:30 -04:00
mono_item.rs Fix ICE: global_asm!() Don't Panic When Unable to Evaluate Constant 2024-03-18 11:35:40 -04:00
size_of_val.rs CFI: Use Instance at callsites 2024-03-23 18:30:39 +00:00
target_features.rs Bump indexmap 2024-02-13 21:03:34 +00:00