rust/compiler/rustc_codegen_llvm/src
Nilstrieb 645c0fddd2 Put noundef on all scalars that don't allow uninit
Previously, it was only put on scalars with range validity invariants
like bool, was uninit was obviously invalid for those.

Since then, we have normatively declared all uninit primitives to be
undefined behavior and can therefore put `noundef` on them.

The remaining concern was the `mem::uninitialized` function, which cause
quite a lot of UB in the older parts of the ecosystem. This function now
doesn't return uninit values anymore, making users of it safe from this
change.

The only real sources of UB where people could encounter uninit
primitives are `MaybeUninit::uninit().assume_init()`, which has always
be clear in the docs about being UB and from heap allocations (like
reading from the spare capacity of a vec. This is hopefully rare enough
to not break anything.
2023-01-17 08:14:35 +01:00
..
back Remove wrapper functions for some unstable options 2022-12-20 15:02:15 +01:00
coverageinfo rustc: Remove needless lifetimes 2022-12-20 22:10:40 +01:00
debuginfo rustc: Remove needless lifetimes 2022-12-20 22:10:40 +01:00
llvm Rollup merge of #105975 - jeremystucki:rustc-remove-needless-lifetimes, r=eholk 2022-12-24 00:31:41 +01:00
abi.rs cleanup: handle -Zmutable-noalias like -Zbox-noalias 2023-01-04 19:24:42 -05:00
allocator.rs Add LLVM KCFI support to the Rust compiler 2022-12-08 17:24:39 -08:00
asm.rs use &str / String literals instead of format!() 2022-12-18 16:17:46 +01:00
attributes.rs Rollup merge of #105955 - Nilstrieb:no-trivial-opt-wrappers-we-have-field-accesses-for-that, r=cjgillot 2022-12-25 22:15:00 +01:00
base.rs Remove several unused methods from MiscMethods 2022-10-01 16:45:07 +00:00
builder.rs Put noundef on all scalars that don't allow uninit 2023-01-17 08:14:35 +01:00
callee.rs Workaround for private global symbol issue 2022-11-18 11:38:31 -08:00
common.rs Introduce a fallible variant of LLVMConstIntGetZExtValue 2022-09-09 15:54:14 +02:00
consts.rs Move linkage type check to HIR analysis and fix semantics issues. 2022-12-05 15:05:43 -08:00
context.rs Use Error behavior for LLVM versions prior to 15 2022-12-20 11:47:11 -08:00
declare.rs Add LLVM KCFI support to the Rust compiler 2022-12-08 17:24:39 -08:00
errors.rs Auto merge of #105421 - jacobbramley:jb/branch-prot-check, r=nagisa 2022-12-17 12:10:27 +00:00
intrinsic.rs DELETE - fn span_invalid_monomorphization_error and localize intrinsics macros 2022-12-27 20:59:22 -05:00
lib.rs Port diagnostics created by Handler 2022-11-09 14:56:21 +01:00
llvm_util.rs Remove wrapper functions for some unstable options 2022-12-20 15:02:15 +01:00
mono_item.rs Fix diag() and formatting 2022-11-09 14:56:20 +01:00
type_.rs Rollup merge of #105109 - rcvalle:rust-kcfi, r=bjorn3 2022-12-10 09:24:43 +01:00
type_of.rs add is_sized method on Abi and Layout, and use it 2022-11-13 12:23:53 +01:00
va_arg.rs Implement va_list and va_arg for s390x FFI 2022-12-19 21:07:57 +01:00
value.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00