builtin: implement -d exit_after_panic_message (speeds up `v test-parser` with gcc/clang)
parent
5931b26737
commit
2be0c6af47
|
@ -48,6 +48,9 @@ fn panic_debug(line_no int, file string, mod string, fn_name string, s string) {
|
||||||
eprintln(' file: $file')
|
eprintln(' file: $file')
|
||||||
eprintln(' line: ' + line_no.str())
|
eprintln(' line: ' + line_no.str())
|
||||||
eprintln('=========================================')
|
eprintln('=========================================')
|
||||||
|
$if exit_after_panic_message ? {
|
||||||
|
C.exit(1)
|
||||||
|
}
|
||||||
// recent versions of tcc print better backtraces automatically
|
// recent versions of tcc print better backtraces automatically
|
||||||
$if !tinyc {
|
$if !tinyc {
|
||||||
print_backtrace_skipping_top_frames(1)
|
print_backtrace_skipping_top_frames(1)
|
||||||
|
@ -58,6 +61,9 @@ fn panic_debug(line_no int, file string, mod string, fn_name string, s string) {
|
||||||
|
|
||||||
pub fn panic(s string) {
|
pub fn panic(s string) {
|
||||||
eprintln('V panic: $s')
|
eprintln('V panic: $s')
|
||||||
|
$if exit_after_panic_message ? {
|
||||||
|
C.exit(1)
|
||||||
|
}
|
||||||
// recent versions of tcc print better backtraces automatically
|
// recent versions of tcc print better backtraces automatically
|
||||||
$if !tinyc {
|
$if !tinyc {
|
||||||
print_backtrace()
|
print_backtrace()
|
||||||
|
|
Loading…
Reference in New Issue