about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorHans Wennborg <hans@chromium.org>2025-01-30 12:30:14 +0100
committerHans Wennborg <hans@chromium.org>2025-01-30 12:30:14 +0100
commit6e457b88eb6058267794ab6dbf595cf8f183368c (patch)
tree8665938711764ac26725b9f787ad1ccc5b09f55f /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent23fb08bb532ed8a9b4947c213ae3fc0862b2b254 (diff)
downloadrust-6e457b88eb6058267794ab6dbf595cf8f183368c.tar.gz
rust-6e457b88eb6058267794ab6dbf595cf8f183368c.zip
use Attribute::getWithCaptureInfo
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
-rw-r--r--compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp3
1 files changed, 1 insertions, 2 deletions
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)));