summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGCall.cpp
diff options
context:
space:
mode:
authorDawn Perchik <dawn@burble.org>2010-09-03 01:29:35 +0000
committerDawn Perchik <dawn@burble.org>2010-09-03 01:29:35 +0000
commit335e16bad41d38c6c1a790cf3795b465a8e41678 (patch)
treebe04426fb490c6dec81a5301d5e04ab83cbabb6a /clang/lib/CodeGen/CGCall.cpp
parentadc6bca2dd05d8c9892b8758feb7d6e88f19f828 (diff)
downloadbcm5719-llvm-335e16bad41d38c6c1a790cf3795b465a8e41678.tar.gz
bcm5719-llvm-335e16bad41d38c6c1a790cf3795b465a8e41678.zip
Add symantic support for the Pascal calling convention via
"__attribute((pascal))" or "__pascal" (and "_pascal" under -fborland-extensions). Support still needs to be added to llvm. llvm-svn: 112939
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 f698d146f1b..475dfa5c102 100644
--- a/clang/lib/CodeGen/CGCall.cpp
+++ b/clang/lib/CodeGen/CGCall.cpp
@@ -36,6 +36,7 @@ static unsigned ClangCallConvToLLVMCallConv(CallingConv CC) {
case CC_X86StdCall: return llvm::CallingConv::X86_StdCall;
case CC_X86FastCall: return llvm::CallingConv::X86_FastCall;
case CC_X86ThisCall: return llvm::CallingConv::X86_ThisCall;
+ // TODO: add support for CC_X86Pascal to llvm
}
}
@@ -100,6 +101,9 @@ static CallingConv getCallingConventionForDecl(const Decl *D) {
if (D->hasAttr<ThisCallAttr>())
return CC_X86ThisCall;
+ if (D->hasAttr<PascalAttr>())
+ return CC_X86Pascal;
+
return CC_C;
}
OpenPOWER on IntegriCloud