Skip to content

Commit 6df0f1d

Browse files
committed
[LangRef] Clarify to exclude norecurse attribute when any call path
through external functions is present.
1 parent c0562ff commit 6df0f1d

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

llvm/docs/LangRef.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2256,9 +2256,12 @@ For example:
22562256
behavior at runtime if the function ever does dynamically return. Annotated
22572257
functions may still raise an exception, i.a., ``nounwind`` is not implied.
22582258
``norecurse``
2259-
This function attribute indicates that the function does not call itself
2260-
either directly or indirectly down any possible call path. This produces
2261-
undefined behavior at runtime if the function ever does recurse.
2259+
This function attribute indicates that the function does not participate in
2260+
recursion, either directly or through mutual recursion. At runtime it is
2261+
undefined behavior if any dynamic call stack contains this function more
2262+
than once at the same time. A function must not be marked ``norecurse`` if,
2263+
along any call path starting from its body, control may reach an external
2264+
function whose definition is not available.
22622265

22632266
.. _langref_willreturn:
22642267

0 commit comments

Comments
 (0)