mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-08-13 18:00:05 +02:00
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:
@@ -20,6 +20,23 @@
|
||||
#include "gen/tollvm.h"
|
||||
|
||||
struct PPC64TargetABI : TargetABI {
|
||||
llvm::CallingConv::ID callingConv(LINK l)
|
||||
{
|
||||
switch (l)
|
||||
{
|
||||
case LINKc:
|
||||
case LINKcpp:
|
||||
case LINKintrinsic:
|
||||
case LINKpascal:
|
||||
case LINKwindows:
|
||||
return llvm::CallingConv::C;
|
||||
case LINKd:
|
||||
case LINKdefault:
|
||||
return llvm::CallingConv::Fast;
|
||||
default:
|
||||
llvm_unreachable("Unhandled D linkage type.");
|
||||
}
|
||||
}
|
||||
|
||||
void newFunctionType(TypeFunction* tf)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user