diff options
author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2022-07-18 21:14:43 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-18 21:14:43 +0530 |
commit | a027b01f33e3280dff1a7be09d6090151d3f78a9 (patch) | |
tree | f6bfe00253a2bb38b997bfd862b1f2e48948fa0a /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
parent | 5ccdf1f6f7651001e3b15f48c6f2e5d0b56accf2 (diff) | |
parent | 530b5da49b822fd65214ecbe85455114e0ce725f (diff) | |
download | rust-a027b01f33e3280dff1a7be09d6090151d3f78a9.tar.gz |
Rollup merge of #98998 - workingjubilee:naked-means-no-clothes-enforcement-technology, r=Amanieu
Remove branch target prologues from `#[naked] fn`
This patch hacks around rust-lang/rust#98768 for now via injecting appropriate attributes into the LLVMIR we emit for naked functions. I intend to pursue this upstream so that these attributes can be removed in general, but it's slow going wading through C++ for me.
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 7ac3157e7a1..2d35ee8976e 100644 --- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp @@ -176,6 +176,8 @@ static Attribute::AttrKind fromRust(LLVMRustAttribute Kind) { return Attribute::NoAlias; case NoCapture: return Attribute::NoCapture; + case NoCfCheck: + return Attribute::NoCfCheck; case NoInline: return Attribute::NoInline; case NonNull: |