diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-09-11 22:25:00 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-09-11 22:25:00 +0000 |
commit | bbaeca4fef72dc7bea6f0d78fd5e29f6df0b2fdc (patch) | |
tree | 18264af9a078304edf146f69681ed89d902b00d2 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 7feafc70d94c27d1ab90e663ac5f70e243410ba6 (diff) | |
download | bcm5719-llvm-bbaeca4fef72dc7bea6f0d78fd5e29f6df0b2fdc.tar.gz bcm5719-llvm-bbaeca4fef72dc7bea6f0d78fd5e29f6df0b2fdc.zip |
Set the calling convention based on the CGFunctionInfo.
llvm-svn: 81582
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 064f3efcc59..00182113f84 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -343,12 +343,9 @@ void CodeGenModule::SetLLVMFunctionAttributes(const Decl *D, F->setAttributes(llvm::AttrListPtr::get(AttributeList.begin(), AttributeList.size())); - // Set the appropriate calling convention for the Function. - if (D->hasAttr<FastCallAttr>()) - F->setCallingConv(llvm::CallingConv::X86_FastCall); - - if (D->hasAttr<StdCallAttr>()) - F->setCallingConv(llvm::CallingConv::X86_StdCall); + llvm::CallingConv::ID CC = + static_cast<llvm::CallingConv::ID>(Info.getCallingConvention()); + F->setCallingConv(CC); } void CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D, |