mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
builtin: implement -d exit_after_panic_message (speeds up v test-parser
with gcc/clang)
This commit is contained in:
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(' line: ' + line_no.str())
|
||||
eprintln('=========================================')
|
||||
$if exit_after_panic_message ? {
|
||||
C.exit(1)
|
||||
}
|
||||
// recent versions of tcc print better backtraces automatically
|
||||
$if !tinyc {
|
||||
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) {
|
||||
eprintln('V panic: $s')
|
||||
$if exit_after_panic_message ? {
|
||||
C.exit(1)
|
||||
}
|
||||
// recent versions of tcc print better backtraces automatically
|
||||
$if !tinyc {
|
||||
print_backtrace()
|
||||
|
Loading…
Reference in New Issue
Block a user