[HIP] define __CUDA_ARCH_=1 for amdgcn targets
authorYaxun Liu <Yaxun.Liu@amd.com>
Fri, 6 Apr 2018 16:43:42 +0000 (16:43 +0000)
committerYaxun Liu <Yaxun.Liu@amd.com>
Fri, 6 Apr 2018 16:43:42 +0000 (16:43 +0000)
Differential Revision: https://reviews.llvm.org/D45277

llvm-svn: 329420

clang/lib/Basic/Targets.cpp

index 4311095..f468588 100644 (file)
@@ -158,7 +158,7 @@ void defineCudaArchMacro(CudaArch GPU, clang::MacroBuilder &Builder) {
     case CudaArch::GFX810:
     case CudaArch::GFX900:
     case CudaArch::GFX902:
-      return "320";
+      return "1";
     case CudaArch::UNKNOWN:
       llvm_unreachable("unhandled Cuda/HIP Arch");
     }