summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorYaxun Liu <Yaxun.Liu@amd.com>2018-06-12 00:16:33 +0000
committerYaxun Liu <Yaxun.Liu@amd.com>2018-06-12 00:16:33 +0000
commit6c10a66ec7732e8b7afd8ac0260c2e572fbe0a31 (patch)
treef2f1fec310f3a513a61429165579a169f7be6744 /clang/lib/CodeGen/CodeGenModule.cpp
parent9deaf68ed1ff782c91cb08b4dd1bd04c7c02653c (diff)
downloadbcm5719-llvm-6c10a66ec7732e8b7afd8ac0260c2e572fbe0a31.tar.gz
bcm5719-llvm-6c10a66ec7732e8b7afd8ac0260c2e572fbe0a31.zip
[CUDA][HIP] Set kernel calling convention before arrange function
Currently clang set kernel calling convention for CUDA/HIP after arranging function, which causes incorrect kernel function type since it depends on calling convention. This patch moves setting kernel convention before arranging function. Differential Revision: https://reviews.llvm.org/D47733 llvm-svn: 334457
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 814eda4381b..6595694ebd5 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -3671,8 +3671,6 @@ void CodeGenModule::EmitGlobalFunctionDefinition(GlobalDecl GD,
MaybeHandleStaticInExternC(D, Fn);
- if (D->hasAttr<CUDAGlobalAttr>())
- getTargetCodeGenInfo().setCUDAKernelCallingConvention(Fn);
maybeSetTrivialComdat(*D, *Fn);
OpenPOWER on IntegriCloud