Author: Stefan Gränitz Date: 2024-05-30T11:52:15+02:00 New Revision: 4310988991b46c9a35f60abc27a08ee10309a50c
URL: https://github.com/llvm/llvm-project/commit/4310988991b46c9a35f60abc27a08ee10309a50c DIFF: https://github.com/llvm/llvm-project/commit/4310988991b46c9a35f60abc27a08ee10309a50c.diff LOG: [clang-repl] Even more tests create the Interpreter and must check host JIT support 2 (#84758) Added: Modified: clang/test/Interpreter/incremental-mode.cpp clang/unittests/Interpreter/ExceptionTests/InterpreterExceptionTest.cpp clang/unittests/Interpreter/InterpreterTest.cpp Removed: ################################################################################ diff --git a/clang/test/Interpreter/incremental-mode.cpp b/clang/test/Interpreter/incremental-mode.cpp index d63cee0dd6d15..71ff794872b21 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 2f1c4efb381f0..bc2bd11df6aef 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 86eeb4bb733fd..5294a4bce1ace 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(); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits