aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGCall.cpp
diff options
context:
space:
mode:
authorGuy Benyei <guy.benyei@intel.com>2012-12-25 08:53:55 +0000
committerGuy Benyei <guy.benyei@intel.com>2012-12-25 08:53:55 +0000
commit38980086c0f791e8c23cc882574f18e5b4a87db6 (patch)
treef025495547b91f2cc076617f872e53c111a7dd6a /lib/CodeGen/CGCall.cpp
parent140aadf5b927ae294388c680a7db44e5de39578a (diff)
Add intel_ocl_bicc calling convention as a function attribute to clang. The calling convention is already implemented in LLVM.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171056 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCall.cpp')
-rw-r--r--lib/CodeGen/CGCall.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp
index 31cff910a2..cdac2fc762 100644
--- a/lib/CodeGen/CGCall.cpp
+++ b/lib/CodeGen/CGCall.cpp
@@ -41,6 +41,7 @@ static unsigned ClangCallConvToLLVMCallConv(CallingConv CC) {
case CC_X86ThisCall: return llvm::CallingConv::X86_ThisCall;
case CC_AAPCS: return llvm::CallingConv::ARM_AAPCS;
case CC_AAPCS_VFP: return llvm::CallingConv::ARM_AAPCS_VFP;
+ case CC_IntelOclBicc: return llvm::CallingConv::Intel_OCL_BI;
// TODO: add support for CC_X86Pascal to llvm
}
}
@@ -151,6 +152,9 @@ static CallingConv getCallingConventionForDecl(const Decl *D) {
if (D->hasAttr<PnaclCallAttr>())
return CC_PnaclCall;
+ if (D->hasAttr<IntelOclBiccAttr>())
+ return CC_IntelOclBicc;
+
return CC_C;
}