summaryrefslogtreecommitdiffstats
path: root/src/test/run-make-fulldeps/c-unwind-abi-catch-lib-panic/add.c
blob: 444359451f6ecd0ff95756a737a0007e30414f53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#ifdef _WIN32
__declspec(dllexport)
#endif

// An external function, defined in Rust.
extern void panic_if_greater_than_10(unsigned x);

unsigned add_small_numbers(unsigned a, unsigned b) {
    unsigned c = a + b;
    panic_if_greater_than_10(c);
    return c;
}