[clang] [HIP] Define `_OPENMP` on the device for mixed OpenMP CPU compilations (PR #176791)
Johannes Doerfert via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 21 09:37:39 PST 2026
https://github.com/jdoerfert commented:
It makes sense to define _OPENMP if we are doing device compilation if -fopenmp was passed. Users could check ifdef _OPENMP but -fopenmp implies it is defined, I think. So not defining it is somewhat user hostile. That said, the interaction here is clearly not well specified. We could poke the OpenMP standard on the question if we are unsure.
https://github.com/llvm/llvm-project/pull/176791
More information about the cfe-commits
mailing list