File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -4186,6 +4186,24 @@ fn declare_intrinsics(ModuleRef llmod) -> hashmap[str,ValueRef] {
4186
4186
ret intrinsics;
4187
4187
}
4188
4188
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
+
4189
4207
fn check_module ( ModuleRef llmod) {
4190
4208
auto pm = mk_pass_manager ( ) ;
4191
4209
llvm. LLVMAddVerifierPass ( pm. llpm ) ;
You can’t perform that action at this time.
0 commit comments