mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
use Attribute::getWithCaptureInfo
This commit is contained in:
parent
23fb08bb53
commit
6e457b88eb
@ -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)));
|
||||
|
Loading…
Reference in New Issue
Block a user