diff options
author | Dawn Perchik <dawn@burble.org> | 2010-09-03 01:29:35 +0000 |
---|---|---|
committer | Dawn Perchik <dawn@burble.org> | 2010-09-03 01:29:35 +0000 |
commit | 52fc314e1b5e1baee6305067cf831763d02bd243 (patch) | |
tree | e6522fa435073d32631e8de16eb6d3e2e05df117 /lib/CodeGen/CGCall.cpp | |
parent | 47a88fa2efdaf40449b7e7e28252c7c6f410b37f (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112939 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCall.cpp')
-rw-r--r-- | lib/CodeGen/CGCall.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp index f698d146f1..475dfa5c10 100644 --- a/lib/CodeGen/CGCall.cpp +++ b/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; } |