[PATCH] D79636: [LangRef] Clarify the semantics of the `byval` attribute

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat May 9 12:12:59 PDT 2020


efriedma added a comment.

> Do you object to say that the call site argument and the argument point to distinct memory locations or something else?

Like I said, my issue is with the "Attributes on the call site argument and function argument are associated with the original and copied memory respectively".  I assume this means "attributes other than byval".  If I'm understanding this correctly, this means it isn't legal to copy attributes from the caller to the callee.  If an argument is marked "readnone byval" on a function, it's illegal to copy that "readnone" to the callsite, because the readnone would then be associated with the original memory, not the copied memory.  Or, a more silly example, say you had "byval returned" on the called function, and that got copied to the callsite: that clearly can't mean the original pointer is returned by the function.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79636





More information about the llvm-commits mailing list