Skip to content

Commit efab7c2

Browse files
committed
update
Created using spr 1.3.4
1 parent d89dbe8 commit efab7c2

File tree

2 files changed

+3
-13
lines changed

2 files changed

+3
-13
lines changed

libcxxabi/test/forced_unwind2.pass.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,9 @@ struct Stop<R (*)(Args...)> {
4343
}
4444
};
4545

46-
static void cleanup(_Unwind_Reason_Code, struct _Unwind_Exception* exc) {
47-
delete exc;
48-
}
49-
5046
static void forced_unwind() {
51-
_Unwind_Exception* exc = new _Unwind_Exception;
52-
memset(&exc->exception_class, 0, sizeof(exc->exception_class));
53-
exc->exception_cleanup = cleanup;
54-
_Unwind_ForcedUnwind(exc, Stop<_Unwind_Stop_Fn>::stop, 0);
47+
static _Unwind_Exception exc = {};
48+
_Unwind_ForcedUnwind(&exc, Stop<_Unwind_Stop_Fn>::stop, 0);
5549
abort();
5650
}
5751

libcxxabi/test/forced_unwind3.pass.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,10 @@ struct Stop<R (*)(Args...)> {
6060
}
6161
};
6262

63-
static void cleanup(_Unwind_Reason_Code, struct _Unwind_Exception* exc) {
64-
delete exc;
65-
}
66-
6763
static void forced_unwind() {
6864
_Unwind_Exception* exc = new _Unwind_Exception;
6965
memset(&exc->exception_class, 0, sizeof(exc->exception_class));
70-
exc->exception_cleanup = cleanup;
66+
exc->exception_cleanup = 0;
7167
_Unwind_ForcedUnwind(exc, Stop<_Unwind_Stop_Fn>::stop, 0);
7268
abort();
7369
}

0 commit comments

Comments
 (0)