[libc-commits] [libc] [libc/docs] Add a quick note about LLVM_LIBC_VARIABLE (PR #201556)

via libc-commits libc-commits at lists.llvm.org
Thu Jun 4 04:43:01 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

Author: Pavel Labath (labath)

<details>
<summary>Changes</summary>



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


1 Files Affected:

- (modified) libc/docs/dev/implementation_standard.rst (+4) 


``````````diff
diff --git a/libc/docs/dev/implementation_standard.rst b/libc/docs/dev/implementation_standard.rst
index a334cf1a11b3a..fcb1182734d4f 100644
--- a/libc/docs/dev/implementation_standard.rst
+++ b/libc/docs/dev/implementation_standard.rst
@@ -74,3 +74,7 @@ the macro is defined as follows::
 
 The LLVM_LIBC_FUNCTION_ATTR macro is normally defined to nothing, but can be
 defined by vendors who want to set their own attributes.
+
+When defining a variable, use the ``LLVM_LIBC_VARIABLE`` macro::
+
+    LLVM_LIBC_VARIABLE(char **, environ) = nullptr;

``````````

</details>


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


More information about the libc-commits mailing list