1 //! flags = ['-Wl,--no-entry,--export=fib', '-gdwarf-4', '-gsplit-dwarf']
2 //! dwp = true
3 
4 int fib(int n) {
5   int t, a = 0, b = 1;
6   for (int i = 0; i < n; i++) {
7     t = a;
8     a = b;
9     b += t;
10   }
11   return b;
12 }
13 
14 // Placed at the end so that line numbers are stable.
15 //
16 //   clang --target=wasm32 fib-wasm.c -o fib-wasm-split4.wasm \
17 //     -gdwarf-4 -gsplit-dwarf \
18 //     -Wl,--no-entry,--export=fib -nostdlib -fdebug-prefix-map=$PWD=.
19 //   llvm-dwp -e fib-wasm-split4.wasm -o fib-wasm-split4.dwp
20