[Attr] Add "willreturn" function attribute
This patch introduces a new function attribute, willreturn, to indicate that a call of this function will either exhibit undefined behavior or comes back and continues execution at a point in the existing call stack that includes the current invocation. This attribute guarantees that the function does not have any endless loops, endless recursion, or terminating functions like abort or exit. Patch by Hideto Ueno (@uenoku) Reviewers: jdoerfert Subscribers: mehdi_amini, hiraditya, steven_wu, dexonsmith, lebedev.ri, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62801 llvm-svn: 364555
This commit is contained in:
@@ -710,6 +710,8 @@ static uint64_t getAttrKindEncoding(Attribute::AttrKind Kind) {
|
||||
return bitc::ATTR_KIND_SWIFT_SELF;
|
||||
case Attribute::UWTable:
|
||||
return bitc::ATTR_KIND_UW_TABLE;
|
||||
case Attribute::WillReturn:
|
||||
return bitc::ATTR_KIND_WILLRETURN;
|
||||
case Attribute::WriteOnly:
|
||||
return bitc::ATTR_KIND_WRITEONLY;
|
||||
case Attribute::ZExt:
|
||||
|
||||
Reference in New Issue
Block a user