Revert "Reapply "[llvm-jitlink] Use concurrent linking by default." with fixes. ...
[llvm-project.git] / clang / test / Interpreter / code-undo.cpp
blob83ade0ec9158ba305524b61d9d4d847de0a8c07b
1 // UNSUPPORTED: system-aix
2 // RUN: cat %s | clang-repl | FileCheck %s
3 extern "C" int printf(const char *, ...);
4 int x1 = 0;
5 int x2 = 42;
6 %undo
7 int x2 = 24;
8 auto r1 = printf("x1 = %d\n", x1);
9 // CHECK: x1 = 0
10 auto r2 = printf("x2 = %d\n", x2);
11 // CHECK-NEXT: x2 = 24
13 int foo() { return 1; }
14 %undo
15 int foo() { return 2; }
16 auto r3 = printf("foo() = %d\n", foo());
17 // CHECK-NEXT: foo() = 2
19 inline int bar() { return 42;}
20 auto r4 = bar();
21 %undo
22 auto r5 = bar();
24 %quit