From 8a9f3fd8bb14a64a31a29bf5cf5376b643218b71 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Fri, 11 Sep 2009 22:25:00 +0000 Subject: Set the calling convention based on the CGFunctionInfo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81582 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenModule.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'lib/CodeGen/CodeGenModule.cpp') diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index 064f3efcc5..00182113f8 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/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()) - F->setCallingConv(llvm::CallingConv::X86_FastCall); - - if (D->hasAttr()) - F->setCallingConv(llvm::CallingConv::X86_StdCall); + llvm::CallingConv::ID CC = + static_cast(Info.getCallingConvention()); + F->setCallingConv(CC); } void CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D, -- cgit v1.2.3-18-g5258