Extend the 'noalias' attribute to function return values. This is intended to
indicate functions that allocate, such as operator new, or list::insert. The
actual definition is slightly less strict (for now).

No changes to the bitcode reader/writer, asm printer or verifier were needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59934 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/docs/LangRef.html b/docs/LangRef.html
index b6ea8e9..bc3b40b 100644
--- a/docs/LangRef.html
+++ b/docs/LangRef.html
@@ -890,10 +890,11 @@
     return values. </dd>
 
     <dt><tt>noalias</tt></dt>
-    <dd>This indicates that the parameter does not alias any global or any other
-    parameter.  The caller is responsible for ensuring that this is the case,
-    usually by placing the value in a stack allocation. This is not a valid
-    attribute for return values.</dd>
+    <dd>This indicates that the pointer does not alias any global or any other
+    parameter.  The caller is responsible for ensuring that this is the
+    case. Additionally, on a function return value <tt>noalias</tt> indicates
+    that the pointer does not alias the return value from other calls of
+    itself or other noalias functions.</dd>
 
     <dt><tt>nest</tt></dt>
     <dd>This indicates that the pointer parameter can be excised using the
@@ -3155,7 +3156,7 @@
 <h5>Semantics:</h5>
 
 <p>Memory is allocated using the system "<tt>malloc</tt>" function, and
-a pointer is returned.  The result of a zero byte allocattion is undefined.  The
+a pointer is returned.  The result of a zero byte allocation is undefined.  The
 result is null if there is insufficient memory available.</p>
 
 <h5>Example:</h5>