Move calling convention conversion into TargetABI.

The code is tightly coupled to TargetABI (the transformations
there only make sense knowing that the right CC is selected).
This commit is contained in:
David Nadlinger 2013-02-18 10:02:32 +01:00
parent 1a132d5d41
commit 3392f70a4e
10 changed files with 109 additions and 43 deletions

View file

@ -779,7 +779,7 @@ void DtoDeclareFunction(FuncDeclaration* fdecl)
&& !fdecl->isMain()
#endif
)
func->setCallingConv(DtoCallingConv(fdecl->loc, f->linkage));
func->setCallingConv(gABI->callingConv(f->linkage));
else // fall back to C, it should be the right thing to do
func->setCallingConv(llvm::CallingConv::C);