Set writable and dead_on_unwind attributes for sret arguments
This commit is contained in:
parent
aa067fb984
commit
3695af697e
7 changed files with 31 additions and 3 deletions
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue