[NFC][Py Reformat] Reformat python files in llvm
[llvm-project.git] / libunwind / test / unw_resume.pass.cpp
blob76273e4a8ef0a71d642380a58d7680b053606151
1 // -*- C++ -*-
2 //===----------------------------------------------------------------------===//
3 //
4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 // See https://llvm.org/LICENSE.txt for license information.
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //
8 //===----------------------------------------------------------------------===//
10 // Ensure that unw_resume() resumes execution at the stack frame identified by
11 // cursor.
13 // TODO: Investigate this failure on AIX system.
14 // XFAIL: target={{.*}}-aix{{.*}}
16 // TODO: Figure out why this fails with Memory Sanitizer.
17 // XFAIL: msan
19 #include <libunwind.h>
21 void test_unw_resume() {
22 unw_context_t context;
23 unw_cursor_t cursor;
25 unw_getcontext(&context);
26 unw_init_local(&cursor, &context);
27 unw_step(&cursor);
28 unw_resume(&cursor);
31 int main() {
32 test_unw_resume();
33 return 0;