[PATCH] D49042: [LangRef] Clarify alloca of zero bytes.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 10 17:07:16 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL336744: [LangRef] Clarify alloca of zero bytes. (authored by efriedma, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D49042?vs=154451&id=154905#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D49042

Files:
  llvm/trunk/docs/LangRef.rst


Index: llvm/trunk/docs/LangRef.rst
===================================================================
--- llvm/trunk/docs/LangRef.rst
+++ llvm/trunk/docs/LangRef.rst
@@ -7862,9 +7862,9 @@
 '``alloca``' instruction is commonly used to represent automatic
 variables that must have an address available. When the function returns
 (either with the ``ret`` or ``resume`` instructions), the memory is
-reclaimed. Allocating zero bytes is legal, but the result is undefined.
-The order in which memory is allocated (ie., which way the stack grows)
-is not specified.
+reclaimed. Allocating zero bytes is legal, but the returned pointer may not
+be unique. The order in which memory is allocated (ie., which way the stack
+grows) is not specified.
 
 Example:
 """"""""


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49042.154905.patch
Type: text/x-patch
Size: 765 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180711/b90e4413/attachment.bin>


More information about the llvm-commits mailing list