[llvm] [LangRef] Add description of toc-data global variables (PR #94828)

via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 7 19:12:53 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-ir

Author: Kai Luo (bzEq)

<details>
<summary>Changes</summary>

Add description of `toc-data` global variable in LLVM Language Reference.

Addressed comment in https://github.com/llvm/llvm-project/pull/94593#pullrequestreview-2102796085.

---
Full diff: https://github.com/llvm/llvm-project/pull/94828.diff


1 Files Affected:

- (modified) llvm/docs/LangRef.rst (+3) 


``````````diff
diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst
index 9fb2c048a5c86..093f9e4c62086 100644
--- a/llvm/docs/LangRef.rst
+++ b/llvm/docs/LangRef.rst
@@ -812,6 +812,9 @@ doesn't). These kinds of structs (we may call them homogeneous scalable vector
 structs) are considered sized and can be used in loads, stores, allocas, but
 not GEPs.
 
+Globals with ``toc-data`` attribute set are stored in TOC of XCOFF. Their
+alignments are the same as that of a TOC entry.
+
 Syntax::
 
       @<GlobalVarName> = [Linkage] [PreemptionSpecifier] [Visibility]

``````````

</details>


https://github.com/llvm/llvm-project/pull/94828


More information about the llvm-commits mailing list