tra accepted this revision. tra added inline comments.
================ Comment at: clang/lib/Basic/Targets/NVPTX.cpp:171 Builder.defineMacro("__NVPTX__"); - if (Opts.CUDAIsDevice || Opts.OpenMPIsDevice) { + if (Opts.CUDAIsDevice || Opts.OpenMPIsDevice || !HostTarget) { // Set __CUDA_ARCH__ for the GPU specified. ---------------- Wouldn't just `if(!HostTarget)` be sufficient here? ================ Comment at: clang/test/Frontend/nvptx-macros.c:1 +// REQUIRES: nvptx-registered-target + ---------------- I'd rename the file to make it more obvious that it deals with a standalone compilation. `standalone-nvptx-macros.c` ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146975/new/ https://reviews.llvm.org/D146975 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits