summaryrefslogtreecommitdiffstats
path: root/clang/tools
diff options
context:
space:
mode:
authorSameer Sahasrabuddhe <sameer.sahasrabuddhe@amd.com>2015-01-20 06:44:32 +0000
committerSameer Sahasrabuddhe <sameer.sahasrabuddhe@amd.com>2015-01-20 06:44:32 +0000
commit450a58b8afbc1790bb58412de5bf0eaa9c599666 (patch)
treed283328cd3c84234f28de0a90d657dd43776342a /clang/tools
parent0b0f4660faa5072aa5f75560722f224b9712629c (diff)
downloadbcm5719-llvm-450a58b8afbc1790bb58412de5bf0eaa9c599666.tar.gz
bcm5719-llvm-450a58b8afbc1790bb58412de5bf0eaa9c599666.zip
Introduce SPIR calling conventions.
This implements Section 3.7 from the SPIR 1.2 spec: SPIR kernels should use "spir_kernel" calling convention. Non-kernel functions use "spir_func" calling convention. All other calling conventions are disallowed. The patch works only for OpenCL source. Any other uses will need to ensure that kernels are assigned the spir_kernel calling convention correctly. llvm-svn: 226548
Diffstat (limited to 'clang/tools')
-rw-r--r--clang/tools/libclang/CXType.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/tools/libclang/CXType.cpp b/clang/tools/libclang/CXType.cpp
index 81cff5abb4f..04778ddfbb4 100644
--- a/clang/tools/libclang/CXType.cpp
+++ b/clang/tools/libclang/CXType.cpp
@@ -527,6 +527,9 @@ CXCallingConv clang_getFunctionTypeCallingConv(CXType X) {
TCALLINGCONV(AAPCS_VFP);
TCALLINGCONV(PnaclCall);
TCALLINGCONV(IntelOclBicc);
+ case CC_SpirFunction: return CXCallingConv_Unexposed;
+ case CC_SpirKernel: return CXCallingConv_Unexposed;
+ break;
}
#undef TCALLINGCONV
}
OpenPOWER on IntegriCloud