diff options
| author | Nikita Popov <nikita.ppv@gmail.com> | 2021-02-20 17:02:23 +0100 |
|---|---|---|
| committer | Nikita Popov <nikita.ppv@gmail.com> | 2021-03-01 23:35:35 +0100 |
| commit | bc96516a28d9e8e816b0f45c628a9cd49a2f380d (patch) | |
| tree | b32609d26c3fd4961d262fd9aeb5192134cc5239 /compiler/rustc_codegen_llvm | |
| parent | 41b81584e2ff579fa4ff1d94496fb0884b50fa2e (diff) | |
| download | rust-bc96516a28d9e8e816b0f45c628a9cd49a2f380d.tar.gz rust-bc96516a28d9e8e816b0f45c628a9cd49a2f380d.zip | |
Mark pure asm as willreturn
Diffstat (limited to 'compiler/rustc_codegen_llvm')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/asm.rs | 1 | ||||
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/llvm/ffi.rs | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/asm.rs b/compiler/rustc_codegen_llvm/src/asm.rs index 26815de403f..38c8ae711a4 100644 --- a/compiler/rustc_codegen_llvm/src/asm.rs +++ b/compiler/rustc_codegen_llvm/src/asm.rs @@ -304,6 +304,7 @@ impl AsmBuilderMethods<'tcx> for Builder<'a, 'll, 'tcx> { } else if options.contains(InlineAsmOptions::READONLY) { llvm::Attribute::ReadOnly.apply_callsite(llvm::AttributePlace::Function, result); } + llvm::Attribute::WillReturn.apply_callsite(llvm::AttributePlace::Function, result); } else if options.contains(InlineAsmOptions::NOMEM) { llvm::Attribute::InaccessibleMemOnly .apply_callsite(llvm::AttributePlace::Function, result); diff --git a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs index 7f7575e58c9..e6d60044c84 100644 --- a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs +++ b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs @@ -132,6 +132,7 @@ pub enum Attribute { ReadNone = 26, InaccessibleMemOnly = 27, SanitizeHWAddress = 28, + WillReturn = 29, } /// LLVMIntPredicate |
