diff options
| author | Hugues de Valon <hugues.devalon@arm.com> | 2020-09-28 21:10:38 +0100 | 
|---|---|---|
| committer | Hugues de Valon <hugues.devalon@arm.com> | 2020-09-30 15:48:59 +0100 | 
| commit | 1aaafac6ffec2556a27a3c34365c685c124ee029 (patch) | |
| tree | 77cbc602d6bae6db65f1a4083146042d52035683 /compiler/rustc_codegen_llvm/src/llvm/mod.rs | |
| parent | d255d70e7a6a84c82cc74f968f529f42dd40b8ce (diff) | |
| download | rust-1aaafac6ffec2556a27a3c34365c685c124ee029.tar.gz rust-1aaafac6ffec2556a27a3c34365c685c124ee029.zip  | |
Add support for cmse_nonsecure_entry attribute
This patch adds support for the LLVM cmse_nonsecure_entry attribute. This is a target-dependent attribute that only has sense for the thumbv8m Rust targets. You can find more information about this attribute here: https://developer.arm.com/documentation/ecm0359818/latest/ Signed-off-by: Hugues de Valon <hugues.devalon@arm.com>
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm/mod.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/llvm/mod.rs | 6 | 
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm/mod.rs b/compiler/rustc_codegen_llvm/src/llvm/mod.rs index c09e3659f80..ed9b99188bb 100644 --- a/compiler/rustc_codegen_llvm/src/llvm/mod.rs +++ b/compiler/rustc_codegen_llvm/src/llvm/mod.rs @@ -37,6 +37,12 @@ pub fn AddFunctionAttrStringValue(llfn: &'a Value, idx: AttributePlace, attr: &C } } +pub fn AddFunctionAttrString(llfn: &'a Value, idx: AttributePlace, attr: &CStr) { + unsafe { + LLVMRustAddFunctionAttrStringValue(llfn, idx.as_uint(), attr.as_ptr(), std::ptr::null()) + } +} + #[derive(Copy, Clone)] pub enum AttributePlace { ReturnValue,  | 
