Mark pure asm as willreturn
This commit is contained in:
parent
41b81584e2
commit
bc96516a28
@ -304,6 +304,7 @@ impl AsmBuilderMethods<'tcx> for Builder<'a, 'll, 'tcx> {
|
||||
} else if options.contains(InlineAsmOptions::READONLY) {
|
||||
llvm::Attribute::ReadOnly.apply_callsite(llvm::AttributePlace::Function, result);
|
||||
}
|
||||
llvm::Attribute::WillReturn.apply_callsite(llvm::AttributePlace::Function, result);
|
||||
} else if options.contains(InlineAsmOptions::NOMEM) {
|
||||
llvm::Attribute::InaccessibleMemOnly
|
||||
.apply_callsite(llvm::AttributePlace::Function, result);
|
||||
|
@ -132,6 +132,7 @@ pub enum Attribute {
|
||||
ReadNone = 26,
|
||||
InaccessibleMemOnly = 27,
|
||||
SanitizeHWAddress = 28,
|
||||
WillReturn = 29,
|
||||
}
|
||||
|
||||
/// LLVMIntPredicate
|
||||
|
@ -86,6 +86,7 @@ enum LLVMRustAttribute {
|
||||
ReadNone = 26,
|
||||
InaccessibleMemOnly = 27,
|
||||
SanitizeHWAddress = 28,
|
||||
WillReturn = 29,
|
||||
};
|
||||
|
||||
typedef struct OpaqueRustString *RustStringRef;
|
||||
|
@ -207,6 +207,8 @@ static Attribute::AttrKind fromRust(LLVMRustAttribute Kind) {
|
||||
return Attribute::InaccessibleMemOnly;
|
||||
case SanitizeHWAddress:
|
||||
return Attribute::SanitizeHWAddress;
|
||||
case WillReturn:
|
||||
return Attribute::WillReturn;
|
||||
}
|
||||
report_fatal_error("bad AttributeKind");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user