Skip to content

Commit 4310988

Browse files
[clang-repl] Even more tests create the Interpreter and must check host JIT support 2 (#84758)
1 parent b2bd024 commit 4310988

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

clang/test/Interpreter/incremental-mode.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// UNSUPPORTED: system-aix
2+
//
13
// RUN: clang-repl -Xcc -E
24
// RUN: clang-repl -Xcc -emit-llvm
35
// RUN: clang-repl -Xcc -xc

clang/unittests/Interpreter/ExceptionTests/InterpreterExceptionTest.cpp

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@
3737
LLVM_ATTRIBUTE_USED int __lsan_is_turned_off() { return 1; }
3838
#endif
3939

40+
#if defined(_AIX) || defined(__MVS__)
41+
#define CLANG_INTERPRETER_PLATFORM_CANNOT_CREATE_LLJIT
42+
#endif
43+
4044
using namespace clang;
4145

4246
namespace {
@@ -54,7 +58,11 @@ createInterpreter(const Args &ExtraArgs = {},
5458
return cantFail(clang::Interpreter::create(std::move(CI)));
5559
}
5660

57-
TEST(InterpreterTest, CatchException) {
61+
#ifdef CLANG_INTERPRETER_PLATFORM_CANNOT_CREATE_LLJIT
62+
TEST(InterpreterExceptionTest, DISABLED_CatchException) {
63+
#else
64+
TEST(InterpreterExceptionTest, CatchException) {
65+
#endif
5866
llvm::llvm_shutdown_obj Y; // Call llvm_shutdown() on exit.
5967
llvm::InitializeNativeTarget();
6068
llvm::InitializeNativeTargetAsmPrinter();
@@ -109,10 +117,6 @@ extern "C" int throw_exception() {
109117
const clang::CompilerInstance *CI = Interp->getCompilerInstance();
110118
const llvm::Triple &Triple = CI->getASTContext().getTargetInfo().getTriple();
111119

112-
// AIX is unsupported.
113-
if (Triple.isOSAIX())
114-
GTEST_SKIP();
115-
116120
// FIXME: ARM fails due to `Not implemented relocation type!`
117121
if (Triple.isARM())
118122
GTEST_SKIP();

clang/unittests/Interpreter/InterpreterTest.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,11 @@ static size_t DeclsSize(TranslationUnitDecl *PTUDecl) {
7474
return std::distance(PTUDecl->decls().begin(), PTUDecl->decls().end());
7575
}
7676

77+
#ifdef CLANG_INTERPRETER_NO_SUPPORT_EXEC
78+
TEST(InterpreterTest, DISABLED_Sanity) {
79+
#else
7780
TEST(InterpreterTest, Sanity) {
81+
#endif
7882
if (!HostSupportsJit())
7983
GTEST_SKIP();
8084

0 commit comments

Comments
 (0)