diff options
author | Krzysztof Parzyszek <Krzysztof.Parzyszek@amd.com> | 2025-04-02 15:16:33 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-02 15:16:33 -0500 |
commit | 564e04b703dc5df062f862e32c00bf1a1716f96f (patch) | |
tree | e5a8ae548aec1979bfe90ff19a460aebf073b10b /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 2026873fb8a1f654aa920cd5ea8074e55053973b (diff) | |
download | llvm-564e04b703dc5df062f862e32c00bf1a1716f96f.zip llvm-564e04b703dc5df062f862e32c00bf1a1716f96f.tar.gz llvm-564e04b703dc5df062f862e32c00bf1a1716f96f.tar.bz2 |
[flang][OpenMP] Use function symbol on DECLARE TARGET (#134107)
Consider:
```
function foo()
!$omp declare target(foo) ! This `foo` was a function-result symbol
...
end
```
When resolving symbols, for this case use the symbol corresponding to
the function instead of the symbol corresponding to the function result.
Currently, this will result in an error:
```
error: A variable that appears in a DECLARE TARGET directive must be
declared in the scope of a module or have the SAVE attribute, either
explicitly or implicitly
```
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions