[PATCH] D131628: [LangRef] Add description for nocallback attribute

Nicolai Hähnle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 3 22:28:55 PDT 2022


nhaehnle added inline comments.


================
Comment at: llvm/docs/LangRef.rst:1758
+    a direct, possibly transitive, external function call, use of ``longjmp``,
+    or other means.
 ``noduplicate``
----------------
mysterymath wrote:
> The GCC docs specify that the called function can return to the caller's "compilation unit" via either return or exception handling. The current uses of nocallback in LLVM seem to also allow exception handling control flow out of the callback, so we should mention this here too.
"Translation unit" isn't an LLVM IR concept, so most likely this should say "module" instead. I glimpsed some earlier discussion that seems related, but admittedly didn't get to read all of the history, so my apologies if this is redundant. 

And I agree with @mysterymath that it should be explicitly stated that jumping into the caller's module via a return or exception is fine.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131628/new/

https://reviews.llvm.org/D131628



More information about the llvm-commits mailing list