diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst --- a/llvm/docs/LangRef.rst +++ b/llvm/docs/LangRef.rst @@ -1901,7 +1901,7 @@ through this pointer argument, even though it may write to the memory that the pointer points to. - If a readonly function writes memory visible to the program, or + If a readonly function writes memory visible to a caller function, or has other side-effects, the behavior is undefined. If a function writes to a readonly pointer argument, the behavior is undefined. ``"stack-probe-size"`` @@ -1923,13 +1923,13 @@ This attribute disables ABI-required stack probes, if any. ``writeonly`` On a function, this attribute indicates that the function may write to but - does not read from memory. + does not read from memory visible to caller functions. On an argument, this attribute indicates that the function may write to but does not read through this pointer argument (even though it may read from the memory that the pointer points to). - If a writeonly function reads memory visible to the program, or + If a writeonly function reads memory visible to caller functions, or has other side-effects, the behavior is undefined. If a function reads from a writeonly pointer argument, the behavior is undefined. ``argmemonly``