1
Fork 0

Set writable and dead_on_unwind attributes for sret arguments

This commit is contained in:
Nikita Popov 2024-02-19 15:02:49 +01:00
parent aa067fb984
commit 3695af697e
7 changed files with 31 additions and 3 deletions

View file

@ -312,6 +312,16 @@ static Attribute::AttrKind fromRust(LLVMRustAttribute Kind) {
return Attribute::SafeStack;
case FnRetThunkExtern:
return Attribute::FnRetThunkExtern;
#if LLVM_VERSION_GE(18, 0)
case Writable:
return Attribute::Writable;
case DeadOnUnwind:
return Attribute::DeadOnUnwind;
#else
case Writable:
case DeadOnUnwind:
report_fatal_error("Not supported on this LLVM version");
#endif
}
report_fatal_error("bad AttributeKind");
}