summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGCall.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-05-18 16:57:00 +0000
committerDouglas Gregor <dgregor@apple.com>2010-05-18 16:57:00 +0000
commita941dcae166bd52e5ec4499e8a31a153dd1e1778 (patch)
treedb0cb22bc26e6255ce0fe87e95356cef1229acff /clang/lib/CodeGen/CGCall.cpp
parentbe48c548c5593f1b6f9d02fec59c1a204e20c71e (diff)
downloadbcm5719-llvm-a941dcae166bd52e5ec4499e8a31a153dd1e1778.tar.gz
bcm5719-llvm-a941dcae166bd52e5ec4499e8a31a153dd1e1778.zip
Add support for Microsoft's __thiscall, from Steven Watanabe!
llvm-svn: 104026
Diffstat (limited to 'clang/lib/CodeGen/CGCall.cpp')
-rw-r--r--clang/lib/CodeGen/CGCall.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp
index 92d15d9d8c9..0d6a70c64d4 100644
--- a/clang/lib/CodeGen/CGCall.cpp
+++ b/clang/lib/CodeGen/CGCall.cpp
@@ -38,6 +38,7 @@ static unsigned ClangCallConvToLLVMCallConv(CallingConv CC) {
default: return llvm::CallingConv::C;
case CC_X86StdCall: return llvm::CallingConv::X86_StdCall;
case CC_X86FastCall: return llvm::CallingConv::X86_FastCall;
+ case CC_X86ThisCall: return llvm::CallingConv::X86_ThisCall;
}
}
@@ -97,6 +98,9 @@ static CallingConv getCallingConventionForDecl(const Decl *D) {
if (D->hasAttr<FastCallAttr>())
return CC_X86FastCall;
+ if (D->hasAttr<ThisCallAttr>())
+ return CC_X86ThisCall;
+
return CC_C;
}
OpenPOWER on IntegriCloud