forked from ldc-developers/ldc
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathirtypefunction.h
59 lines (47 loc) · 1.23 KB
/
irtypefunction.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//===-- ir/irtypefunction.h - IrType subclasses for callables ---*- C++ -*-===//
//
// LDC – the LLVM D compiler
//
// This file is distributed under the BSD-style LDC license. See the LICENSE
// file for details.
//
//===----------------------------------------------------------------------===//
//
// Provides the IrType subclasses used to represent D function/delegate types.
//
//===----------------------------------------------------------------------===//
#ifndef __LDC_IR_IRTYPEFUNCTION_H__
#define __LDC_IR_IRTYPEFUNCTION_H__
#include "ir/irtype.h"
struct IrFuncTy;
///
class IrTypeFunction : public IrType {
public:
///
static IrTypeFunction *get(Type *dt);
///
IrTypeFunction *isFunction() override { return this; }
///
IrFuncTy &getIrFuncTy() override { return irFty; }
protected:
///
IrTypeFunction(Type *dt, llvm::Type *lt, IrFuncTy irFty);
///
IrFuncTy irFty;
};
///
class IrTypeDelegate : public IrType {
public:
///
static IrTypeDelegate *get(Type *dt);
///
IrTypeDelegate *isDelegate() override { return this; }
///
IrFuncTy &getIrFuncTy() override { return irFty; }
protected:
///
IrTypeDelegate(Type *dt, LLType *lt, IrFuncTy irFty);
///
IrFuncTy irFty;
};
#endif