forked from ldc-developers/ldc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgluelayer.d
74 lines (65 loc) · 1.77 KB
/
gluelayer.d
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/**
* Declarations for back-end functions that the front-end invokes.
*
* This 'glues' either the DMC or GCC back-end to the front-end.
*
* Copyright: Copyright (C) 1999-2024 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
* Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/gluelayer.d, _gluelayer.d)
* Documentation: https://dlang.org/phobos/dmd_gluelayer.html
* Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/gluelayer.d
*/
module dmd.gluelayer;
import dmd.dmodule;
import dmd.dscope;
import dmd.dsymbol;
import dmd.mtype;
import dmd.statement;
import dmd.root.file;
version (IN_LLVM)
{
extern (C++)
{
struct AsmCode;
// < 2.072: no `extern (C++, class)` support
/*extern (C++, class)*/ struct IrType;
Statement asmSemantic(AsmStatement s, Scope* sc);
}
alias code = AsmCode;
alias type = IrType;
}
else version (NoBackend)
{
struct Symbol;
struct code;
struct block;
struct BlockState;
struct elem;
struct TYPE;
alias type = TYPE;
extern(C++) abstract class ObjcGlue
{
static void initialize() {}
}
}
else version (IN_GCC)
{
extern (C++) union tree_node;
alias Symbol = tree_node;
alias code = tree_node;
alias type = tree_node;
// stubs
extern(C++) abstract class ObjcGlue
{
static void initialize() {}
}
}
else
{
public import dmd.backend.cc : block, BlockState, Symbol;
public import dmd.backend.type : type;
public import dmd.backend.el : elem;
public import dmd.backend.x86.code_x86 : code;
public import dmd.objc_glue : ObjcGlue;
}