[clang] [HIP] Do not apply 'externally_initialized' to constant device variables (PR #182157)

Alex Voicu via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 24 14:55:11 PST 2026


AlexVlx wrote:

> > Hmm, is this actually true for cases where you have a `__constant__` declaration, rather than a definition?
> 
> This PR changes `const` and `contexpr` to longer apply `externally_initialized`. If you use `__constant__` without that it should be unaffected. 

Hmm, ok, that sounds reasonable, thank you for clarifying; I was misreading the `isConstQualified` as something else.

> There is no HIP support in the LLVM/Offloading library.

Indeed, there is not, but you referenced that it does so I assumed it was, in this case, somehow symmetric. My bad.



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


More information about the cfe-commits mailing list