Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / native_client / tests / toolchain / eh_helper.h
1 /*
2  * Copyright (c) 2012 The Native Client Authors. All rights reserved.
3  * Use of this source code is governed by a BSD-style license that can be
4  * found in the LICENSE file.
5  */
6
7
8 #ifndef NATIVE_CLIENT_TESTS_TOOLCHAIN_EH_HELPER_H_
9 #define NATIVE_CLIENT_TESTS_TOOLCHAIN_EH_HELPER_H_ 1
10
11 #include <stdio.h>
12 #include <stdlib.h>
13
14 int g_step = 0;
15
16 void __attribute__((noinline)) next_step(int n) {
17   printf("%d -> %d\n", g_step, n);
18   if (g_step != n - 1) {
19     printf("ERROR: bad step\n");
20     abort();
21   }
22   g_step = n;
23 }
24
25 #endif  // NATIVE_CLIENT_TESTS_TOOLCHAIN_EH_HELPER_H_