Skip to content

Commit ce44a29

Browse files
committed
---
yaml --- r: 1334 b: refs/heads/master c: 8e963f6 h: refs/heads/master v: v3
1 parent 8e380bc commit ce44a29

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: dd3ed6139a6fc6fda15403d0b5679535959945e5
2+
refs/heads/master: 8e963f63a8d076c8e2f162ba27c49e6cb1dacb96

trunk/src/comp/middle/trans.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4186,6 +4186,24 @@ fn declare_intrinsics(ModuleRef llmod) -> hashmap[str,ValueRef] {
41864186
ret intrinsics;
41874187
}
41884188

4189+
4190+
fn trace_str(@block_ctxt cx, str s) {
4191+
trans_upcall(cx, "upcall_trace_str", vec(p2i(C_cstr(cx.fcx.ccx, s))));
4192+
}
4193+
4194+
fn trace_word(@block_ctxt cx, ValueRef v) {
4195+
trans_upcall(cx, "upcall_trace_word", vec(v));
4196+
}
4197+
4198+
fn trace_ptr(@block_ctxt cx, ValueRef v) {
4199+
trace_word(cx, cx.build.PtrToInt(v, T_int()));
4200+
}
4201+
4202+
fn trap(@block_ctxt bcx) {
4203+
let vec[ValueRef] v = vec();
4204+
bcx.build.Call(bcx.fcx.ccx.intrinsics.get("llvm.trap"), v);
4205+
}
4206+
41894207
fn check_module(ModuleRef llmod) {
41904208
auto pm = mk_pass_manager();
41914209
llvm.LLVMAddVerifierPass(pm.llpm);

0 commit comments

Comments
 (0)