[PATCH] D143057: [LangRef] Global variable declarations imply minimum size

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 13 23:23:56 PST 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rG2e9549db2686: [LangRef] Global variable declarations imply minimum size (authored by nikic).

Changed prior to commit:
  https://reviews.llvm.org/D143057?vs=493879&id=497216#toc

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D143057

Files:
  llvm/docs/LangRef.rst


Index: llvm/docs/LangRef.rst
===================================================================
--- llvm/docs/LangRef.rst
+++ llvm/docs/LangRef.rst
@@ -721,12 +721,11 @@
 impose a stronger alignment on these variables. The maximum alignment
 is ``1 << 32``.
 
-For global variables declarations, as well as definitions that may be
+For global variable declarations, as well as definitions that may be
 replaced at link time (``linkonce``, ``weak``, ``extern_weak`` and ``common``
-linkage types), LLVM makes no assumptions about the allocation size of the
-variables, except that they may not overlap. The alignment of a global variable
-declaration or replaceable definition must not be greater than the alignment of
-the definition it resolves to.
+linkage types), the allocation size and alignment of the definition it resolves
+to must be greater than or equal to that of the declaration or replaceable
+definition, otherwise the behavior is undefined.
 
 Globals can also have a :ref:`DLL storage class <dllstorageclass>`,
 an optional :ref:`runtime preemption specifier <runtime_preemption_model>`,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143057.497216.patch
Type: text/x-patch
Size: 1106 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230214/11017dec/attachment.bin>


More information about the llvm-commits mailing list