forked from JuliaLang/julia
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcodegen_shared.h
More file actions
51 lines (42 loc) · 1020 Bytes
/
codegen_shared.h
File metadata and controls
51 lines (42 loc) · 1020 Bytes
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
// This file is a part of Julia. License is MIT: https://julialang.org/license
#include <llvm/Support/Debug.h>
#include <llvm/IR/DebugLoc.h>
enum AddressSpace {
Generic = 0,
Tracked = 10,
Derived = 11,
CalleeRooted = 12,
Loaded = 13,
FirstSpecial = Tracked,
LastSpecial = Loaded,
};
#define JLCALL_CC (CallingConv::ID)36
#define JLCALL_F_CC (CallingConv::ID)37
static inline void llvm_dump(llvm::Value *v)
{
v->print(llvm::dbgs(), true);
llvm::dbgs() << "\n";
}
static inline void llvm_dump(llvm::Type *v)
{
v->print(llvm::dbgs(), true);
llvm::dbgs() << "\n";
}
static inline void llvm_dump(llvm::Function *f)
{
f->print(llvm::dbgs(), nullptr, false, true);
}
static inline void llvm_dump(llvm::Module *m)
{
m->print(llvm::dbgs(), nullptr);
}
static inline void llvm_dump(llvm::Metadata *m)
{
m->print(llvm::dbgs());
llvm::dbgs() << "\n";
}
static inline void llvm_dump(llvm::DebugLoc *dbg)
{
dbg->print(llvm::dbgs());
llvm::dbgs() << "\n";
}