mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-04-29 22:50:53 +03:00
37 lines
935 B
C++
37 lines
935 B
C++
#ifndef LDC_GEN_FUNCTIONS_H
|
|
#define LDC_GEN_FUNCTIONS_H
|
|
|
|
#include "mars.h"
|
|
|
|
struct FuncDeclaration;
|
|
struct Type;
|
|
|
|
struct IRAsmBlock;
|
|
|
|
namespace llvm
|
|
{
|
|
class Value;
|
|
}
|
|
|
|
// TODO: hack for old d2 frontends
|
|
#if DMDV2
|
|
typedef Argument Parameter;
|
|
typedef Arguments Parameters;
|
|
#endif
|
|
|
|
const llvm::FunctionType* DtoFunctionType(Type* t, Type* thistype, Type* nesttype, bool ismain = false);
|
|
const llvm::FunctionType* DtoFunctionType(FuncDeclaration* fdecl);
|
|
|
|
const llvm::FunctionType* DtoBaseFunctionType(FuncDeclaration* fdecl);
|
|
|
|
void DtoResolveFunction(FuncDeclaration* fdecl);
|
|
void DtoDeclareFunction(FuncDeclaration* fdecl);
|
|
void DtoDefineFunction(FuncDeclaration* fd);
|
|
|
|
void DtoDefineNakedFunction(FuncDeclaration* fd);
|
|
void emitABIReturnAsmStmt(IRAsmBlock* asmblock, Loc loc, FuncDeclaration* fdecl);
|
|
|
|
DValue* DtoArgument(Parameter* fnarg, Expression* argexp);
|
|
void DtoVariadicArgument(Expression* argexp, llvm::Value* dst);
|
|
|
|
#endif
|