diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/AST/DumpXML.cpp | 1 | ||||
-rw-r--r-- | lib/AST/Type.cpp | 1 | ||||
-rw-r--r-- | lib/AST/TypePrinter.cpp | 4 | ||||
-rw-r--r-- | lib/Basic/Targets.cpp | 3 | ||||
-rw-r--r-- | lib/CodeGen/CGCall.cpp | 4 | ||||
-rw-r--r-- | lib/Sema/SemaDeclAttr.cpp | 5 | ||||
-rw-r--r-- | lib/Sema/SemaType.cpp | 5 |
7 files changed, 21 insertions, 2 deletions
diff --git a/lib/AST/DumpXML.cpp b/lib/AST/DumpXML.cpp index f2483f4296..ce4e21f90b 100644 --- a/lib/AST/DumpXML.cpp +++ b/lib/AST/DumpXML.cpp @@ -922,6 +922,7 @@ struct XMLDumper : public XMLDeclVisitor<XMLDumper>, case CC_AAPCS: return set("cc", "aapcs"); case CC_AAPCS_VFP: return set("cc", "aapcs_vfp"); case CC_PnaclCall: return set("cc", "pnaclcall"); + case CC_IntelOclBicc: return set("cc", "intel_ocl_bicc"); } } diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp index 673528ada0..2f91cd8551 100644 --- a/lib/AST/Type.cpp +++ b/lib/AST/Type.cpp @@ -1552,6 +1552,7 @@ StringRef FunctionType::getNameForCallConv(CallingConv CC) { case CC_AAPCS: return "aapcs"; case CC_AAPCS_VFP: return "aapcs-vfp"; case CC_PnaclCall: return "pnaclcall"; + case CC_IntelOclBicc: return "intel_ocl_bicc"; } llvm_unreachable("Invalid calling convention."); diff --git a/lib/AST/TypePrinter.cpp b/lib/AST/TypePrinter.cpp index 83ffec4cda..9feaf5721e 100644 --- a/lib/AST/TypePrinter.cpp +++ b/lib/AST/TypePrinter.cpp @@ -647,6 +647,9 @@ void TypePrinter::printFunctionProtoAfter(const FunctionProtoType *T, case CC_PnaclCall: OS << " __attribute__((pnaclcall))"; break; + case CC_IntelOclBicc: + OS << " __attribute__((intel_ocl_bicc))"; + break; } if (Info.getNoReturn()) OS << " __attribute__((noreturn))"; @@ -1168,6 +1171,7 @@ void TypePrinter::printAttributedAfter(const AttributedType *T, break; } case AttributedType::attr_pnaclcall: OS << "pnaclcall"; break; + case AttributedType::attr_inteloclbicc: OS << "inteloclbicc"; break; } OS << "))"; } diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp index 5f7f75d440..ea19b15848 100644 --- a/lib/Basic/Targets.cpp +++ b/lib/Basic/Targets.cpp @@ -1803,7 +1803,8 @@ public: CC == CC_X86FastCall || CC == CC_X86StdCall || CC == CC_C || - CC == CC_X86Pascal) ? CCCR_OK : CCCR_Warning; + CC == CC_X86Pascal || + CC == CC_IntelOclBicc) ? CCCR_OK : CCCR_Warning; } virtual CallingConv getDefaultCallingConv(CallingConvMethodType MT) const { 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; } diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp index 437e2a826b..cf3335316e 100644 --- a/lib/Sema/SemaDeclAttr.cpp +++ b/lib/Sema/SemaDeclAttr.cpp @@ -3613,6 +3613,9 @@ static void handleCallConvAttr(Sema &S, Decl *D, const AttributeList &Attr) { case AttributeList::AT_PnaclCall: D->addAttr(::new (S.Context) PnaclCallAttr(Attr.getRange(), S.Context)); return; + case AttributeList::AT_IntelOclBicc: + D->addAttr(::new (S.Context) IntelOclBiccAttr(Attr.getRange(), S.Context)); + return; default: llvm_unreachable("unexpected attribute kind"); @@ -3668,6 +3671,7 @@ bool Sema::CheckCallingConvAttr(const AttributeList &attr, CallingConv &CC, return true; } case AttributeList::AT_PnaclCall: CC = CC_PnaclCall; break; + case AttributeList::AT_IntelOclBicc: CC = CC_IntelOclBicc; break; default: llvm_unreachable("unexpected attribute kind"); } @@ -4440,6 +4444,7 @@ static void ProcessInheritableDeclAttr(Sema &S, Scope *scope, Decl *D, case AttributeList::AT_Pascal: case AttributeList::AT_Pcs: case AttributeList::AT_PnaclCall: + case AttributeList::AT_IntelOclBicc: handleCallConvAttr(S, D, Attr); break; case AttributeList::AT_OpenCLKernel: diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp index 1afc8c7f25..bbd8a7e935 100644 --- a/lib/Sema/SemaType.cpp +++ b/lib/Sema/SemaType.cpp @@ -106,7 +106,8 @@ static void diagnoseBadTypeAttribute(Sema &S, const AttributeList &attr, case AttributeList::AT_Pascal: \ case AttributeList::AT_Regparm: \ case AttributeList::AT_Pcs: \ - case AttributeList::AT_PnaclCall \ + case AttributeList::AT_PnaclCall: \ + case AttributeList::AT_IntelOclBicc \ namespace { /// An object which stores processing state for the entire @@ -3032,6 +3033,8 @@ static AttributeList::Kind getAttrListKind(AttributedType::Kind kind) { return AttributeList::AT_Pcs; case AttributedType::attr_pnaclcall: return AttributeList::AT_PnaclCall; + case AttributedType::attr_inteloclbicc: + return AttributeList::AT_IntelOclBicc; } llvm_unreachable("unexpected attribute kind!"); } |