[PATCH] D129250: [clang-repl][NFC] Split weak symbol test to a new test
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGeee6a12227a6: [clang-repl][NFC] Split weak symbol test to a new test (authored by junaire). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129250/new/ https://reviews.llvm.org/D129250 Files: clang/test/Interpreter/execute-weak.cpp clang/test/Interpreter/execute.cpp Index: clang/test/Interpreter/execute.cpp === --- clang/test/Interpreter/execute.cpp +++ clang/test/Interpreter/execute.cpp @@ -3,7 +3,6 @@ // RUN:'auto r1 = printf("i = %d\n", i);' | FileCheck --check-prefix=CHECK-DRIVER %s // REQUIRES: host-supports-jit // UNSUPPORTED: system-aix -// XFAIL: system-windows // CHECK-DRIVER: i = 10 // RUN: cat %s | clang-repl | FileCheck %s extern "C" int printf(const char *, ...); @@ -19,8 +18,4 @@ inline int foo() { return 42; } int r3 = foo(); -int __attribute__((weak)) bar() { return 1; } -auto r4 = printf("bar() = %d\n", bar()); -// CHECK-NEXT: bar() = 1 - %quit Index: clang/test/Interpreter/execute-weak.cpp === --- clang/test/Interpreter/execute-weak.cpp +++ clang/test/Interpreter/execute-weak.cpp @@ -7,20 +7,8 @@ // CHECK-DRIVER: i = 10 // RUN: cat %s | clang-repl | FileCheck %s extern "C" int printf(const char *, ...); -int i = 42; -auto r1 = printf("i = %d\n", i); -// CHECK: i = 42 - -struct S { float f = 1.0; S *m = nullptr;} s; - -auto r2 = printf("S[f=%f, m=0x%llx]\n", s.f, reinterpret_cast(s.m)); -// CHECK-NEXT: S[f=1.00, m=0x0] - -inline int foo() { return 42; } -int r3 = foo(); - -int __attribute__((weak)) bar() { return 1; } +int __attribute__((weak)) bar() { return 42; } auto r4 = printf("bar() = %d\n", bar()); -// CHECK-NEXT: bar() = 1 +// CHECK: bar() = 42 %quit Index: clang/test/Interpreter/execute.cpp === --- clang/test/Interpreter/execute.cpp +++ clang/test/Interpreter/execute.cpp @@ -3,7 +3,6 @@ // RUN:'auto r1 = printf("i = %d\n", i);' | FileCheck --check-prefix=CHECK-DRIVER %s // REQUIRES: host-supports-jit // UNSUPPORTED: system-aix -// XFAIL: system-windows // CHECK-DRIVER: i = 10 // RUN: cat %s | clang-repl | FileCheck %s extern "C" int printf(const char *, ...); @@ -19,8 +18,4 @@ inline int foo() { return 42; } int r3 = foo(); -int __attribute__((weak)) bar() { return 1; } -auto r4 = printf("bar() = %d\n", bar()); -// CHECK-NEXT: bar() = 1 - %quit Index: clang/test/Interpreter/execute-weak.cpp === --- clang/test/Interpreter/execute-weak.cpp +++ clang/test/Interpreter/execute-weak.cpp @@ -7,20 +7,8 @@ // CHECK-DRIVER: i = 10 // RUN: cat %s | clang-repl | FileCheck %s extern "C" int printf(const char *, ...); -int i = 42; -auto r1 = printf("i = %d\n", i); -// CHECK: i = 42 - -struct S { float f = 1.0; S *m = nullptr;} s; - -auto r2 = printf("S[f=%f, m=0x%llx]\n", s.f, reinterpret_cast(s.m)); -// CHECK-NEXT: S[f=1.00, m=0x0] - -inline int foo() { return 42; } -int r3 = foo(); - -int __attribute__((weak)) bar() { return 1; } +int __attribute__((weak)) bar() { return 42; } auto r4 = printf("bar() = %d\n", bar()); -// CHECK-NEXT: bar() = 1 +// CHECK: bar() = 42 %quit ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D129250: [clang-repl][NFC] Split weak symbol test to a new test
v.g.vassilev accepted this revision. v.g.vassilev added a comment. This revision is now accepted and ready to land. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129250/new/ https://reviews.llvm.org/D129250 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D129250: [clang-repl][NFC] Split weak symbol test to a new test
junaire updated this revision to Diff 442902. junaire added a comment. extern printf so we can use, another copy paster mistake... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129250/new/ https://reviews.llvm.org/D129250 Files: clang/test/Interpreter/execute-weak.cpp clang/test/Interpreter/execute.cpp Index: clang/test/Interpreter/execute.cpp === --- clang/test/Interpreter/execute.cpp +++ clang/test/Interpreter/execute.cpp @@ -3,7 +3,6 @@ // RUN:'auto r1 = printf("i = %d\n", i);' | FileCheck --check-prefix=CHECK-DRIVER %s // REQUIRES: host-supports-jit // UNSUPPORTED: system-aix -// XFAIL: system-windows // CHECK-DRIVER: i = 10 // RUN: cat %s | clang-repl | FileCheck %s extern "C" int printf(const char *, ...); @@ -19,8 +18,4 @@ inline int foo() { return 42; } int r3 = foo(); -int __attribute__((weak)) bar() { return 1; } -auto r4 = printf("bar() = %d\n", bar()); -// CHECK-NEXT: bar() = 1 - %quit Index: clang/test/Interpreter/execute-weak.cpp === --- clang/test/Interpreter/execute-weak.cpp +++ clang/test/Interpreter/execute-weak.cpp @@ -7,20 +7,8 @@ // CHECK-DRIVER: i = 10 // RUN: cat %s | clang-repl | FileCheck %s extern "C" int printf(const char *, ...); -int i = 42; -auto r1 = printf("i = %d\n", i); -// CHECK: i = 42 - -struct S { float f = 1.0; S *m = nullptr;} s; - -auto r2 = printf("S[f=%f, m=0x%llx]\n", s.f, reinterpret_cast(s.m)); -// CHECK-NEXT: S[f=1.00, m=0x0] - -inline int foo() { return 42; } -int r3 = foo(); - -int __attribute__((weak)) bar() { return 1; } +int __attribute__((weak)) bar() { return 42; } auto r4 = printf("bar() = %d\n", bar()); -// CHECK-NEXT: bar() = 1 +// CHECK: bar() = 42 %quit Index: clang/test/Interpreter/execute.cpp === --- clang/test/Interpreter/execute.cpp +++ clang/test/Interpreter/execute.cpp @@ -3,7 +3,6 @@ // RUN:'auto r1 = printf("i = %d\n", i);' | FileCheck --check-prefix=CHECK-DRIVER %s // REQUIRES: host-supports-jit // UNSUPPORTED: system-aix -// XFAIL: system-windows // CHECK-DRIVER: i = 10 // RUN: cat %s | clang-repl | FileCheck %s extern "C" int printf(const char *, ...); @@ -19,8 +18,4 @@ inline int foo() { return 42; } int r3 = foo(); -int __attribute__((weak)) bar() { return 1; } -auto r4 = printf("bar() = %d\n", bar()); -// CHECK-NEXT: bar() = 1 - %quit Index: clang/test/Interpreter/execute-weak.cpp === --- clang/test/Interpreter/execute-weak.cpp +++ clang/test/Interpreter/execute-weak.cpp @@ -7,20 +7,8 @@ // CHECK-DRIVER: i = 10 // RUN: cat %s | clang-repl | FileCheck %s extern "C" int printf(const char *, ...); -int i = 42; -auto r1 = printf("i = %d\n", i); -// CHECK: i = 42 - -struct S { float f = 1.0; S *m = nullptr;} s; - -auto r2 = printf("S[f=%f, m=0x%llx]\n", s.f, reinterpret_cast(s.m)); -// CHECK-NEXT: S[f=1.00, m=0x0] - -inline int foo() { return 42; } -int r3 = foo(); - -int __attribute__((weak)) bar() { return 1; } +int __attribute__((weak)) bar() { return 42; } auto r4 = printf("bar() = %d\n", bar()); -// CHECK-NEXT: bar() = 1 +// CHECK: bar() = 42 %quit ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D129250: [clang-repl][NFC] Split weak symbol test to a new test
junaire updated this revision to Diff 442879. junaire added a comment. Correct copy paster error Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129250/new/ https://reviews.llvm.org/D129250 Files: clang/test/Interpreter/execute-weak.cpp clang/test/Interpreter/execute.cpp Index: clang/test/Interpreter/execute.cpp === --- clang/test/Interpreter/execute.cpp +++ clang/test/Interpreter/execute.cpp @@ -3,7 +3,6 @@ // RUN:'auto r1 = printf("i = %d\n", i);' | FileCheck --check-prefix=CHECK-DRIVER %s // REQUIRES: host-supports-jit // UNSUPPORTED: system-aix -// XFAIL: system-windows // CHECK-DRIVER: i = 10 // RUN: cat %s | clang-repl | FileCheck %s extern "C" int printf(const char *, ...); @@ -19,8 +18,4 @@ inline int foo() { return 42; } int r3 = foo(); -int __attribute__((weak)) bar() { return 1; } -auto r4 = printf("bar() = %d\n", bar()); -// CHECK-NEXT: bar() = 1 - %quit Index: clang/test/Interpreter/execute-weak.cpp === --- clang/test/Interpreter/execute-weak.cpp +++ clang/test/Interpreter/execute-weak.cpp @@ -6,21 +6,9 @@ // XFAIL: system-windows // CHECK-DRIVER: i = 10 // RUN: cat %s | clang-repl | FileCheck %s -extern "C" int printf(const char *, ...); -int i = 42; -auto r1 = printf("i = %d\n", i); -// CHECK: i = 42 - -struct S { float f = 1.0; S *m = nullptr;} s; - -auto r2 = printf("S[f=%f, m=0x%llx]\n", s.f, reinterpret_cast(s.m)); -// CHECK-NEXT: S[f=1.00, m=0x0] - -inline int foo() { return 42; } -int r3 = foo(); int __attribute__((weak)) bar() { return 1; } auto r4 = printf("bar() = %d\n", bar()); -// CHECK-NEXT: bar() = 1 +// CHECK: bar() = 1 %quit Index: clang/test/Interpreter/execute.cpp === --- clang/test/Interpreter/execute.cpp +++ clang/test/Interpreter/execute.cpp @@ -3,7 +3,6 @@ // RUN:'auto r1 = printf("i = %d\n", i);' | FileCheck --check-prefix=CHECK-DRIVER %s // REQUIRES: host-supports-jit // UNSUPPORTED: system-aix -// XFAIL: system-windows // CHECK-DRIVER: i = 10 // RUN: cat %s | clang-repl | FileCheck %s extern "C" int printf(const char *, ...); @@ -19,8 +18,4 @@ inline int foo() { return 42; } int r3 = foo(); -int __attribute__((weak)) bar() { return 1; } -auto r4 = printf("bar() = %d\n", bar()); -// CHECK-NEXT: bar() = 1 - %quit Index: clang/test/Interpreter/execute-weak.cpp === --- clang/test/Interpreter/execute-weak.cpp +++ clang/test/Interpreter/execute-weak.cpp @@ -6,21 +6,9 @@ // XFAIL: system-windows // CHECK-DRIVER: i = 10 // RUN: cat %s | clang-repl | FileCheck %s -extern "C" int printf(const char *, ...); -int i = 42; -auto r1 = printf("i = %d\n", i); -// CHECK: i = 42 - -struct S { float f = 1.0; S *m = nullptr;} s; - -auto r2 = printf("S[f=%f, m=0x%llx]\n", s.f, reinterpret_cast(s.m)); -// CHECK-NEXT: S[f=1.00, m=0x0] - -inline int foo() { return 42; } -int r3 = foo(); int __attribute__((weak)) bar() { return 1; } auto r4 = printf("bar() = %d\n", bar()); -// CHECK-NEXT: bar() = 1 +// CHECK: bar() = 1 %quit ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D129250: [clang-repl][NFC] Split weak symbol test to a new test
junaire created this revision. junaire added a reviewer: v.g.vassilev. Herald added a project: All. junaire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Windows has some issues when we try to use `__attribute__((weak))` in JIT, so we disabled that. But it's not worth to disable the whole test just for this single feature. This patch split that part from the original test so we can keep testing stuff that normally working in Windows. Signed-off-by: Jun Zhang Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D129250 Files: clang/test/Interpreter/execute-weak.cpp clang/test/Interpreter/execute.cpp Index: clang/test/Interpreter/execute.cpp === --- clang/test/Interpreter/execute.cpp +++ clang/test/Interpreter/execute.cpp @@ -3,7 +3,6 @@ // RUN:'auto r1 = printf("i = %d\n", i);' | FileCheck --check-prefix=CHECK-DRIVER %s // REQUIRES: host-supports-jit // UNSUPPORTED: system-aix -// XFAIL: system-windows // CHECK-DRIVER: i = 10 // RUN: cat %s | clang-repl | FileCheck %s extern "C" int printf(const char *, ...); @@ -19,8 +18,4 @@ inline int foo() { return 42; } int r3 = foo(); -int __attribute__((weak)) bar() { return 1; } -auto r4 = printf("bar() = %d\n", bar()); -// CHECK-NEXT: bar() = 1 - %quit Index: clang/test/Interpreter/execute-weak.cpp === --- clang/test/Interpreter/execute-weak.cpp +++ clang/test/Interpreter/execute-weak.cpp @@ -6,18 +6,6 @@ // XFAIL: system-windows // CHECK-DRIVER: i = 10 // RUN: cat %s | clang-repl | FileCheck %s -extern "C" int printf(const char *, ...); -int i = 42; -auto r1 = printf("i = %d\n", i); -// CHECK: i = 42 - -struct S { float f = 1.0; S *m = nullptr;} s; - -auto r2 = printf("S[f=%f, m=0x%llx]\n", s.f, reinterpret_cast(s.m)); -// CHECK-NEXT: S[f=1.00, m=0x0] - -inline int foo() { return 42; } -int r3 = foo(); int __attribute__((weak)) bar() { return 1; } auto r4 = printf("bar() = %d\n", bar()); Index: clang/test/Interpreter/execute.cpp === --- clang/test/Interpreter/execute.cpp +++ clang/test/Interpreter/execute.cpp @@ -3,7 +3,6 @@ // RUN:'auto r1 = printf("i = %d\n", i);' | FileCheck --check-prefix=CHECK-DRIVER %s // REQUIRES: host-supports-jit // UNSUPPORTED: system-aix -// XFAIL: system-windows // CHECK-DRIVER: i = 10 // RUN: cat %s | clang-repl | FileCheck %s extern "C" int printf(const char *, ...); @@ -19,8 +18,4 @@ inline int foo() { return 42; } int r3 = foo(); -int __attribute__((weak)) bar() { return 1; } -auto r4 = printf("bar() = %d\n", bar()); -// CHECK-NEXT: bar() = 1 - %quit Index: clang/test/Interpreter/execute-weak.cpp === --- clang/test/Interpreter/execute-weak.cpp +++ clang/test/Interpreter/execute-weak.cpp @@ -6,18 +6,6 @@ // XFAIL: system-windows // CHECK-DRIVER: i = 10 // RUN: cat %s | clang-repl | FileCheck %s -extern "C" int printf(const char *, ...); -int i = 42; -auto r1 = printf("i = %d\n", i); -// CHECK: i = 42 - -struct S { float f = 1.0; S *m = nullptr;} s; - -auto r2 = printf("S[f=%f, m=0x%llx]\n", s.f, reinterpret_cast(s.m)); -// CHECK-NEXT: S[f=1.00, m=0x0] - -inline int foo() { return 42; } -int r3 = foo(); int __attribute__((weak)) bar() { return 1; } auto r4 = printf("bar() = %d\n", bar()); ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits