We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5f44530 commit f890e42Copy full SHA for f890e42
src/compiler.rs
@@ -527,6 +527,20 @@ fn compile_func(
527
0,
528
);
529
530
+ #[cfg(feature = "with-debug-utils")]
531
+ {
532
+ // If this env var exists and is a valid statement, insert a debug trap before the libfunc call.
533
+ // Only on when using with-debug-utils feature.
534
+ if let Ok(x) = std::env::var("NATIVE_DEBUG_TRAP_AT_STMT") {
535
+ if x.eq_ignore_ascii_case(&statement_idx.0.to_string()) {
536
+ block.append_operation(
537
+ melior::dialect::ods::llvm::intr_debugtrap(context, location)
538
+ .into(),
539
+ );
540
+ }
541
542
543
+
544
let libfunc_name = if invocation.libfunc_id.debug_name.is_some() {
545
format!("{}(stmt_idx={})", invocation.libfunc_id, statement_idx)
546
} else {
0 commit comments