diff options
author | Vyacheslav Levytskyy <vyacheslav.levytskyy@intel.com> | 2025-01-07 11:14:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-07 11:14:10 +0100 |
commit | a774e7f7b15dbc1a7d4811f155b3a8834b6b7ff8 (patch) | |
tree | 5e2880bf85662b48404899b31d0cbd7298cb530b /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 66acb2694655321b37a1ee3ff19207a111756562 (diff) | |
download | llvm-a774e7f7b15dbc1a7d4811f155b3a8834b6b7ff8.zip llvm-a774e7f7b15dbc1a7d4811f155b3a8834b6b7ff8.tar.gz llvm-a774e7f7b15dbc1a7d4811f155b3a8834b6b7ff8.tar.bz2 |
[SPIR-V] Fix OpName and LinkageAttributes decoration of global variables (#120492)
This PR changes `getGlobalIdentifier()` into `getName()` value when
creating a name of a global variable, and fixes generation of
LinkageAttributes decoration of global variables by taking into account
Private Linkage in addition to Internal.
Previous implementation led to an issue with back translation of SPIR-V
to LLVM IR, e.g.:
```
@__const.G1 = private unnamed_addr addrspace(1) constant %my_type undef
...
Fails to verify module: 'common' global may not be marked constant!
ptr addrspace(1) @"llvm-link;__const.G1"
```
A reproducer is included as a new test case.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions