Skip to content

Commit 6e457b8

Browse files
committed
use Attribute::getWithCaptureInfo
1 parent 23fb08b commit 6e457b8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Diff for: compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -438,8 +438,7 @@ LLVMRustCreateAttrNoValue(LLVMContextRef C, LLVMRustAttributeKind RustAttr) {
438438
#if LLVM_VERSION_GE(21, 0)
439439
// LLVM 21 replaced the NoCapture attribute with Captures(none).
440440
if (RustAttr == LLVMRustAttributeKind::NoCapture) {
441-
return wrap(Attribute::get(*unwrap(C), Attribute::Captures,
442-
CaptureInfo::none().toIntValue()));
441+
return wrap(Attribute::getWithCaptureInfo(*unwrap(C), CaptureInfo::none()));
443442
}
444443
#endif
445444
return wrap(Attribute::get(*unwrap(C), fromRust(RustAttr)));

0 commit comments

Comments
 (0)