diff options
author | dim <dim@FreeBSD.org> | 2013-10-03 20:38:57 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2013-10-03 20:38:57 +0000 |
commit | aae6234255311ce64facefa4a4d332c68542d3b3 (patch) | |
tree | 2d1dccc02cf12c36278f038437b6db16675cd56e /contrib/llvm/tools/clang/lib/AST | |
parent | 5dc4bb5bd3d0e995e13054a94b6d63490561ed9c (diff) | |
download | FreeBSD-src-aae6234255311ce64facefa4a4d332c68542d3b3.zip FreeBSD-src-aae6234255311ce64facefa4a4d332c68542d3b3.tar.gz |
Pull in r189644 from upstream llvm trunk:
Add ms_abi and sysv_abi attribute handling.
Based on a patch by Benno Rice!
This will help to develop EFI support.
Approved by: re (kib)
Verified by: benno
MFC after: 1 week
Diffstat (limited to 'contrib/llvm/tools/clang/lib/AST')
-rw-r--r-- | contrib/llvm/tools/clang/lib/AST/DumpXML.cpp | 2 | ||||
-rw-r--r-- | contrib/llvm/tools/clang/lib/AST/MicrosoftMangle.cpp | 2 | ||||
-rw-r--r-- | contrib/llvm/tools/clang/lib/AST/Type.cpp | 2 | ||||
-rw-r--r-- | contrib/llvm/tools/clang/lib/AST/TypePrinter.cpp | 8 |
4 files changed, 14 insertions, 0 deletions
diff --git a/contrib/llvm/tools/clang/lib/AST/DumpXML.cpp b/contrib/llvm/tools/clang/lib/AST/DumpXML.cpp index be22ae4..dc47c1c 100644 --- a/contrib/llvm/tools/clang/lib/AST/DumpXML.cpp +++ b/contrib/llvm/tools/clang/lib/AST/DumpXML.cpp @@ -921,6 +921,8 @@ struct XMLDumper : public XMLDeclVisitor<XMLDumper>, case CC_X86StdCall: return set("cc", "x86_stdcall"); case CC_X86ThisCall: return set("cc", "x86_thiscall"); case CC_X86Pascal: return set("cc", "x86_pascal"); + case CC_X86_64Win64: return set("cc", "x86_64_win64"); + case CC_X86_64SysV: return set("cc", "x86_64_sysv"); case CC_AAPCS: return set("cc", "aapcs"); case CC_AAPCS_VFP: return set("cc", "aapcs_vfp"); case CC_PnaclCall: return set("cc", "pnaclcall"); diff --git a/contrib/llvm/tools/clang/lib/AST/MicrosoftMangle.cpp b/contrib/llvm/tools/clang/lib/AST/MicrosoftMangle.cpp index 1785063..58088bb 100644 --- a/contrib/llvm/tools/clang/lib/AST/MicrosoftMangle.cpp +++ b/contrib/llvm/tools/clang/lib/AST/MicrosoftMangle.cpp @@ -1311,6 +1311,8 @@ void MicrosoftCXXNameMangler::mangleCallingConvention(const FunctionType *T, switch (CC) { default: llvm_unreachable("Unsupported CC for mangling"); + case CC_X86_64Win64: + case CC_X86_64SysV: case CC_Default: case CC_C: Out << 'A'; break; case CC_X86Pascal: Out << 'C'; break; diff --git a/contrib/llvm/tools/clang/lib/AST/Type.cpp b/contrib/llvm/tools/clang/lib/AST/Type.cpp index fa16fac..4201c9f3d 100644 --- a/contrib/llvm/tools/clang/lib/AST/Type.cpp +++ b/contrib/llvm/tools/clang/lib/AST/Type.cpp @@ -1574,6 +1574,8 @@ StringRef FunctionType::getNameForCallConv(CallingConv CC) { case CC_X86FastCall: return "fastcall"; case CC_X86ThisCall: return "thiscall"; case CC_X86Pascal: return "pascal"; + case CC_X86_64Win64: return "ms_abi"; + case CC_X86_64SysV: return "sysv_abi"; case CC_AAPCS: return "aapcs"; case CC_AAPCS_VFP: return "aapcs-vfp"; case CC_PnaclCall: return "pnaclcall"; diff --git a/contrib/llvm/tools/clang/lib/AST/TypePrinter.cpp b/contrib/llvm/tools/clang/lib/AST/TypePrinter.cpp index 0437076..fd1a72e 100644 --- a/contrib/llvm/tools/clang/lib/AST/TypePrinter.cpp +++ b/contrib/llvm/tools/clang/lib/AST/TypePrinter.cpp @@ -650,6 +650,12 @@ void TypePrinter::printFunctionProtoAfter(const FunctionProtoType *T, case CC_IntelOclBicc: OS << " __attribute__((intel_ocl_bicc))"; break; + case CC_X86_64Win64: + OS << " __attribute__((ms_abi))"; + break; + case CC_X86_64SysV: + OS << " __attribute__((sysv_abi))"; + break; } if (Info.getNoReturn()) OS << " __attribute__((noreturn))"; @@ -1160,6 +1166,8 @@ void TypePrinter::printAttributedAfter(const AttributedType *T, case AttributedType::attr_stdcall: OS << "stdcall"; break; case AttributedType::attr_thiscall: OS << "thiscall"; break; case AttributedType::attr_pascal: OS << "pascal"; break; + case AttributedType::attr_ms_abi: OS << "ms_abi"; break; + case AttributedType::attr_sysv_abi: OS << "sysv_abi"; break; case AttributedType::attr_pcs: { OS << "pcs("; QualType t = T->getEquivalentType(); |