[llvm-commits] [llvm] r44132 - /llvm/trunk/docs/LangRef.html

Duncan Sands baldrick at free.fr
Wed Nov 14 13:14:04 PST 2007


Author: baldrick
Date: Wed Nov 14 15:14:02 2007
New Revision: 44132

URL: http://llvm.org/viewvc/llvm-project?rev=44132&view=rev
Log:
Tweak the descriptions of the new 'const' and 'pure' attributes.

Modified:
    llvm/trunk/docs/LangRef.html

Modified: llvm/trunk/docs/LangRef.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.html?rev=44132&r1=44131&r2=44132&view=diff

==============================================================================
--- llvm/trunk/docs/LangRef.html (original)
+++ llvm/trunk/docs/LangRef.html Wed Nov 14 15:14:02 2007
@@ -814,14 +814,14 @@
     <dd>This indicates that the parameter can be excised using the
     <a href="#int_trampoline">trampoline intrinsics</a>.</dd>
     <dt><tt>pure</tt></dt>
-    <dd>This function attribute indicates, that the function have no effects
-    except the return value and its return value depends only on the
-    arguments and/or global variables.</dd>
+    <dd>This function attribute indicates that the function has no side-effects
+    except for producing a return value.  The value returned must only depend on
+    the function arguments and/or global variables.  It may use values obtained
+    by dereferencing pointers.</dd>
     <dt><tt>const</tt></dt>
-    <dd>This function attribute is slightly more stricter version
-    of <tt>pure</tt> function attribute. <tt>const</tt> functions are not
-    allowed to read global memory, so such function only examines its arguments
-    and has no effects except return value.</dd>
+    <dd>A <tt>const</tt> function has the same restrictions as a <tt>pure</tt>
+    function, but in addition it is not allowed to dereference any pointer arguments
+    or global variables.
   </dl>
 
 </div>





More information about the llvm-commits mailing list