aboutsummaryrefslogtreecommitdiff
path: root/clang
diff options
context:
space:
mode:
authorStefan Gränitz <stefan.graenitz@gmail.com>2024-05-30 11:43:30 +0200
committerStefan Gränitz <stefan.graenitz@gmail.com>2024-05-30 11:52:15 +0200
commit4310988991b46c9a35f60abc27a08ee10309a50c (patch)
treec730d2ce7d7f6565f42aab4f819e1eb39d4b7ab3 /clang
parentb2bd024384b484647da9fd9863bf6f77b5731949 (diff)
downloadllvm-4310988991b46c9a35f60abc27a08ee10309a50c.zip
llvm-4310988991b46c9a35f60abc27a08ee10309a50c.tar.gz
llvm-4310988991b46c9a35f60abc27a08ee10309a50c.tar.bz2
[clang-repl] Even more tests create the Interpreter and must check host JIT support 2 (#84758)
Diffstat (limited to 'clang')
-rw-r--r--clang/test/Interpreter/incremental-mode.cpp2
-rw-r--r--clang/unittests/Interpreter/ExceptionTests/InterpreterExceptionTest.cpp14
-rw-r--r--clang/unittests/Interpreter/InterpreterTest.cpp4
3 files changed, 15 insertions, 5 deletions
diff --git a/clang/test/Interpreter/incremental-mode.cpp b/clang/test/Interpreter/incremental-mode.cpp
index d63cee0..71ff794 100644
--- a/clang/test/Interpreter/incremental-mode.cpp
+++ b/clang/test/Interpreter/incremental-mode.cpp
@@ -1,3 +1,5 @@
+// UNSUPPORTED: system-aix
+//
// RUN: clang-repl -Xcc -E
// RUN: clang-repl -Xcc -emit-llvm
// RUN: clang-repl -Xcc -xc
diff --git a/clang/unittests/Interpreter/ExceptionTests/InterpreterExceptionTest.cpp b/clang/unittests/Interpreter/ExceptionTests/InterpreterExceptionTest.cpp
index 2f1c4ef..bc2bd11 100644
--- a/clang/unittests/Interpreter/ExceptionTests/InterpreterExceptionTest.cpp
+++ b/clang/unittests/Interpreter/ExceptionTests/InterpreterExceptionTest.cpp
@@ -37,6 +37,10 @@
LLVM_ATTRIBUTE_USED int __lsan_is_turned_off() { return 1; }
#endif
+#if defined(_AIX) || defined(__MVS__)
+#define CLANG_INTERPRETER_PLATFORM_CANNOT_CREATE_LLJIT
+#endif
+
using namespace clang;
namespace {
@@ -54,7 +58,11 @@ createInterpreter(const Args &ExtraArgs = {},
return cantFail(clang::Interpreter::create(std::move(CI)));
}
-TEST(InterpreterTest, CatchException) {
+#ifdef CLANG_INTERPRETER_PLATFORM_CANNOT_CREATE_LLJIT
+TEST(InterpreterExceptionTest, DISABLED_CatchException) {
+#else
+TEST(InterpreterExceptionTest, CatchException) {
+#endif
llvm::llvm_shutdown_obj Y; // Call llvm_shutdown() on exit.
llvm::InitializeNativeTarget();
llvm::InitializeNativeTargetAsmPrinter();
@@ -109,10 +117,6 @@ extern "C" int throw_exception() {
const clang::CompilerInstance *CI = Interp->getCompilerInstance();
const llvm::Triple &Triple = CI->getASTContext().getTargetInfo().getTriple();
- // AIX is unsupported.
- if (Triple.isOSAIX())
- GTEST_SKIP();
-
// FIXME: ARM fails due to `Not implemented relocation type!`
if (Triple.isARM())
GTEST_SKIP();
diff --git a/clang/unittests/Interpreter/InterpreterTest.cpp b/clang/unittests/Interpreter/InterpreterTest.cpp
index 86eeb4b..5294a4bc 100644
--- a/clang/unittests/Interpreter/InterpreterTest.cpp
+++ b/clang/unittests/Interpreter/InterpreterTest.cpp
@@ -74,7 +74,11 @@ static size_t DeclsSize(TranslationUnitDecl *PTUDecl) {
return std::distance(PTUDecl->decls().begin(), PTUDecl->decls().end());
}
+#ifdef CLANG_INTERPRETER_NO_SUPPORT_EXEC
+TEST(InterpreterTest, DISABLED_Sanity) {
+#else
TEST(InterpreterTest, Sanity) {
+#endif
if (!HostSupportsJit())
GTEST_SKIP();