From bc96516a28d9e8e816b0f45c628a9cd49a2f380d Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 20 Feb 2021 17:02:23 +0100 Subject: Mark pure asm as willreturn --- compiler/rustc_llvm/llvm-wrapper/LLVMWrapper.h | 1 + compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | 2 ++ 2 files changed, 3 insertions(+) (limited to 'compiler/rustc_llvm/llvm-wrapper') diff --git a/compiler/rustc_llvm/llvm-wrapper/LLVMWrapper.h b/compiler/rustc_llvm/llvm-wrapper/LLVMWrapper.h index 0e3bf5615af..f67e06706ea 100644 --- a/compiler/rustc_llvm/llvm-wrapper/LLVMWrapper.h +++ b/compiler/rustc_llvm/llvm-wrapper/LLVMWrapper.h @@ -86,6 +86,7 @@ enum LLVMRustAttribute { ReadNone = 26, InaccessibleMemOnly = 27, SanitizeHWAddress = 28, + WillReturn = 29, }; typedef struct OpaqueRustString *RustStringRef; diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp index 09dfba292e4..a8536595404 100644 --- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp @@ -207,6 +207,8 @@ static Attribute::AttrKind fromRust(LLVMRustAttribute Kind) { return Attribute::InaccessibleMemOnly; case SanitizeHWAddress: return Attribute::SanitizeHWAddress; + case WillReturn: + return Attribute::WillReturn; } report_fatal_error("bad AttributeKind"); } -- cgit 1.4.1-3-g733a5