summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/CodeExtractor.cpp
diff options
context:
space:
mode:
authorJohannes Doerfert <jdoerfert@anl.gov>2019-06-27 15:51:40 +0000
committerJohannes Doerfert <jdoerfert@anl.gov>2019-06-27 15:51:40 +0000
commit3b77583e95236761d8741fd6df375975a8ca5d83 (patch)
tree62368c6f8dec79ee75d295c2d39c31d41a9646e8 /llvm/lib/Transforms/Utils/CodeExtractor.cpp
parent7d8274d54d0305b827e87adae4619abd6433043c (diff)
downloadbcm5719-llvm-3b77583e95236761d8741fd6df375975a8ca5d83.tar.gz
bcm5719-llvm-3b77583e95236761d8741fd6df375975a8ca5d83.zip
[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
Diffstat (limited to 'llvm/lib/Transforms/Utils/CodeExtractor.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/CodeExtractor.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/CodeExtractor.cpp b/llvm/lib/Transforms/Utils/CodeExtractor.cpp
index 61c1e9313c2..23a404c11a6 100644
--- a/llvm/lib/Transforms/Utils/CodeExtractor.cpp
+++ b/llvm/lib/Transforms/Utils/CodeExtractor.cpp
@@ -801,6 +801,7 @@ Function *CodeExtractor::constructFunction(const ValueSet &inputs,
case Attribute::StructRet:
case Attribute::SwiftError:
case Attribute::SwiftSelf:
+ case Attribute::WillReturn:
case Attribute::WriteOnly:
case Attribute::ZExt:
case Attribute::ImmArg:
OpenPOWER on IntegriCloud