diff options
Diffstat (limited to 'test/lld')
-rw-r--r-- | test/lld/em_asm_O0.c | 2 | ||||
-rw-r--r-- | test/lld/init.c | 14 | ||||
-rw-r--r-- | test/lld/recursive.c | 7 | ||||
-rw-r--r-- | test/lld/reserved_func_ptr.cpp | 8 |
4 files changed, 11 insertions, 20 deletions
diff --git a/test/lld/em_asm_O0.c b/test/lld/em_asm_O0.c index b00c75be2..6351f81b5 100644 --- a/test/lld/em_asm_O0.c +++ b/test/lld/em_asm_O0.c @@ -1,6 +1,6 @@ #include <emscripten.h> -int main(int argc, char **argv) { +int main(int argc, char** argv) { EM_ASM({ Module.print("Hello world"); }); int ret = EM_ASM_INT({ return $0 + $1; }, 20, 30); EM_ASM({ Module.print("Got " + $0); }, 42); diff --git a/test/lld/init.c b/test/lld/init.c index 3a9311e3c..d59f70e1e 100644 --- a/test/lld/init.c +++ b/test/lld/init.c @@ -1,15 +1,7 @@ volatile int x, y; -__attribute__((constructor)) -void init_x() { - x = 14; -} +__attribute__((constructor)) void init_x() { x = 14; } -__attribute__((constructor)) -void init_y() { - y = 144; -} +__attribute__((constructor)) void init_y() { y = 144; } -int main() { - return x + y; -} +int main() { return x + y; } diff --git a/test/lld/recursive.c b/test/lld/recursive.c index c0cdaa425..351b90bcb 100644 --- a/test/lld/recursive.c +++ b/test/lld/recursive.c @@ -3,10 +3,9 @@ int printf(const char* fmt, ...); -__attribute__((noinline)) -int foo(int a, int b) { - printf("%d:%d\n", a, b); - return a + b; +__attribute__((noinline)) int foo(int a, int b) { + printf("%d:%d\n", a, b); + return a + b; } int main() { diff --git a/test/lld/reserved_func_ptr.cpp b/test/lld/reserved_func_ptr.cpp index f40613ea0..31ee08ada 100644 --- a/test/lld/reserved_func_ptr.cpp +++ b/test/lld/reserved_func_ptr.cpp @@ -1,9 +1,9 @@ -int atoi(const char *nptr); +int atoi(const char* nptr); void address_taken_func(int a, int b, int c) {} void address_taken_func2(int a, int b, int c) {} -int main(int argc, char **argv) { +int main(int argc, char** argv) { int fp_v = atoi(argv[1]); int fp_vi = atoi(argv[2]); int fp_iii = atoi(argv[3]); @@ -20,9 +20,9 @@ int main(int argc, char **argv) { void (*f_vi)(int) = reinterpret_cast<void (*)(int)>(fp_vi); int (*f_iii)(int, int) = reinterpret_cast<int (*)(int, int)>(fp_iii); float (*f_fffi)(float, float, int) = - reinterpret_cast<float (*)(float, float, int)>(fp_fffi); + reinterpret_cast<float (*)(float, float, int)>(fp_fffi); double (*f_ddi)(double, int) = - reinterpret_cast<double (*)(double, int)>(fp_ddi); + reinterpret_cast<double (*)(double, int)>(fp_ddi); f_v(); f_vi(3); |