From 8cb0b6ca5bf1321d38f4602113b0f41c837d0586 Mon Sep 17 00:00:00 2001 From: Erik Desjardins Date: Sat, 5 Feb 2022 01:00:37 -0500 Subject: Apply noundef attribute to &T, &mut T, Box, bool This doesn't handle `char` because it's a bit awkward to distinguish it from u32 at this point in codegen. Note that for some types (like `&Struct` and `&mut Struct`), we already apply `dereferenceable`, which implies `noundef`, so the IR does not change. --- compiler/rustc_codegen_llvm/src/llvm/ffi.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'compiler/rustc_codegen_llvm/src/llvm') diff --git a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs index 367c86a1dc9..4f62c685568 100644 --- a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs +++ b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs @@ -189,6 +189,7 @@ pub enum Attribute { StackProtectReq = 30, StackProtectStrong = 31, StackProtect = 32, + NoUndef = 33, } /// LLVMIntPredicate -- cgit 1.4.1-3-g733a5