rust/compiler/rustc_codegen_llvm/src
bors ecb867ec3c Auto merge of #94690 - nnethercote:clarify-Layout-interning, r=fee1-dead
Clarify `Layout` interning.

`Layout` is another type that is sometimes interned, sometimes not, and
we always use references to refer to it so we can't take any advantage
of the uniqueness properties for hashing or equality checks.

This commit renames `Layout` as `LayoutS`, and then introduces a new
`Layout` that is a newtype around an `Interned<LayoutS>`. It also
interns more layouts than before. Previously layouts within layouts
(via the `variants` field) were never interned, but now they are. Hence
the lifetime on the new `Layout` type.

Unlike other interned types, these ones are in `rustc_target` instead of
`rustc_middle`. This reflects the existing structure of the code, which
does layout-specific stuff in `rustc_target` while `TyAndLayout` is
generic over the `Ty`, allowing the type-specific stuff to occur in
`rustc_middle`.

The commit also adds a `HashStable` impl for `Interned`, which was
needed. It hashes the contents, unlike the `Hash` impl which hashes the
pointer.

r? `@fee1-dead`
2022-03-07 15:25:42 +00:00
..
back Improved error message for failed bitcode load 2022-03-06 15:25:05 +01:00
coverageinfo Rollup merge of #90132 - joshtriplett:stabilize-instrument-coverage, r=wesleywiser 2022-02-04 18:42:13 +01:00
debuginfo Auto merge of #93644 - michaelwoerister:simpler-debuginfo-typemap, r=wesleywiser 2022-02-25 11:00:32 +00:00
llvm Auto merge of #94539 - tmiasko:string-attributes, r=nikic 2022-03-04 10:38:11 +00:00
abi.rs Pass LLVM string attributes as string slices 2022-03-03 00:28:50 +01:00
allocator.rs Add LLVM attributes in batches instead of individually 2022-02-26 13:14:55 -05:00
asm.rs Add LLVM attributes in batches instead of individually 2022-02-26 13:14:55 -05:00
attributes.rs Always include global target features in function attributes 2022-03-04 16:57:34 +01:00
base.rs Add LLVM attributes in batches instead of individually 2022-02-26 13:14:55 -05:00
builder.rs Auto merge of #94159 - erikdesjardins:align-load, r=nikic 2022-03-04 08:14:31 +00:00
callee.rs Remove in_band_lifetimes from rustc_codegen_llvm 2021-12-16 14:43:32 -05:00
common.rs Auto merge of #94638 - erikdesjardins:noextranull, r=nagisa 2022-03-07 02:07:36 +00:00
consts.rs Introduce ConstAllocation. 2022-03-07 08:25:50 +11:00
context.rs cleanup: remove unused ability to have LLVM null-terminate const strings 2022-03-06 12:28:46 -05:00
declare.rs Remove LLVM attribute removal 2022-02-28 00:02:11 -05:00
intrinsic.rs Clarify Layout interning. 2022-03-07 13:41:47 +11:00
lib.rs rename ErrorReported -> ErrorGuaranteed 2022-03-02 09:45:25 -06:00
llvm_util.rs all: fix some typos 2022-03-03 19:47:23 +08:00
mono_item.rs Remove in_band_lifetimes from rustc_codegen_llvm 2021-12-16 14:43:32 -05:00
type_.rs Remove in_band_lifetimes from rustc_codegen_llvm 2021-12-16 14:43:32 -05:00
type_of.rs Reapply cg_llvm: fewer_names in uncached_llvm_type 2022-02-22 08:23:53 +01:00
va_arg.rs Introduce Bx::switch_to_block 2022-02-24 12:18:21 +01:00
value.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00