[clang] [llvm] [clang][CodeGen] `used` globals && the payloads for global ctors & dtors are globals (PR #93601)
Alexander Richardson via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 5 10:59:32 PDT 2024
================
@@ -8642,8 +8642,9 @@ The '``llvm.used``' Global Variable
The ``@llvm.used`` global is an array which has
:ref:`appending linkage <linkage_appending>`. This array contains a list of
pointers to named global variables, functions and aliases which may optionally
-have a pointer cast formed of bitcast or getelementptr. For example, a legal
-use of it is:
+have a pointer cast formed of bitcast or getelementptr. The pointers are
+intentionally left unqualified to underline their ephemeral nature. For example,
+a legal use of it is:
----------------
arichardson wrote:
```suggestion
have a pointer cast formed of bitcast or getelementptr. The address space of the
pointers is always zero rather than the globals address space since these are not
real global references but rather a special marker for the code emission logic.
For example,
a legal use of it is:
```
Maybe something like this would be clearer?
https://github.com/llvm/llvm-project/pull/93601
More information about the llvm-commits
mailing list