diff options
| author | Erik Desjardins <erikdesjardins@users.noreply.github.com> | 2022-02-05 01:00:37 -0500 |
|---|---|---|
| committer | Erik Desjardins <erikdesjardins@users.noreply.github.com> | 2022-02-05 01:09:52 -0500 |
| commit | 8cb0b6ca5bf1321d38f4602113b0f41c837d0586 (patch) | |
| tree | ceb48b535511ea78faaa617e20cdef30f20ff4b9 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | 71226d717a1fb57122e47e63b97295e703319cb0 (diff) | |
| download | rust-8cb0b6ca5bf1321d38f4602113b0f41c837d0586.tar.gz rust-8cb0b6ca5bf1321d38f4602113b0f41c837d0586.zip | |
Apply noundef attribute to &T, &mut T, Box<T>, 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.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp index d871290744f..fb9c5e6a527 100644 --- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp @@ -224,6 +224,8 @@ static Attribute::AttrKind fromRust(LLVMRustAttribute Kind) { return Attribute::StackProtectStrong; case StackProtect: return Attribute::StackProtect; + case NoUndef: + return Attribute::NoUndef; } report_fatal_error("bad AttributeKind"); } |
