From 6e457b88eb6058267794ab6dbf595cf8f183368c Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Thu, 30 Jan 2025 12:30:14 +0100 Subject: use Attribute::getWithCaptureInfo --- compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp') diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp index 858251ff9c8..545422682f0 100644 --- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp @@ -438,8 +438,7 @@ LLVMRustCreateAttrNoValue(LLVMContextRef C, LLVMRustAttributeKind RustAttr) { #if LLVM_VERSION_GE(21, 0) // LLVM 21 replaced the NoCapture attribute with Captures(none). if (RustAttr == LLVMRustAttributeKind::NoCapture) { - return wrap(Attribute::get(*unwrap(C), Attribute::Captures, - CaptureInfo::none().toIntValue())); + return wrap(Attribute::getWithCaptureInfo(*unwrap(C), CaptureInfo::none())); } #endif return wrap(Attribute::get(*unwrap(C), fromRust(RustAttr))); -- cgit 1.4.1-3-g733a5