diff --git a/clang/unittests/Interpreter/ExceptionTests/InterpreterExceptionTest.cpp b/clang/unittests/Interpreter/ExceptionTests/InterpreterExceptionTest.cpp index 7a5f07e25bc6f..d827c915e070f 100644 --- a/clang/unittests/Interpreter/ExceptionTests/InterpreterExceptionTest.cpp +++ b/clang/unittests/Interpreter/ExceptionTests/InterpreterExceptionTest.cpp @@ -46,6 +46,7 @@ createInterpreter(const Args &ExtraArgs = {}, } TEST(InterpreterTest, CatchException) { + llvm::llvm_shutdown_obj Y; // Call llvm_shutdown() on exit. llvm::InitializeNativeTarget(); llvm::InitializeNativeTargetAsmPrinter(); @@ -130,8 +131,6 @@ extern "C" int throw_exception() { EXPECT_ANY_THROW(ThrowException()); std::string CapturedStdOut = testing::internal::GetCapturedStdout(); EXPECT_EQ(CapturedStdOut, "Caught: 'To be caught in JIT'\n"); - - llvm::llvm_shutdown(); } } // end anonymous namespace diff --git a/clang/unittests/Interpreter/InterpreterTest.cpp b/clang/unittests/Interpreter/InterpreterTest.cpp index 745e36071936a..d266dd0c0c768 100644 --- a/clang/unittests/Interpreter/InterpreterTest.cpp +++ b/clang/unittests/Interpreter/InterpreterTest.cpp @@ -28,6 +28,12 @@ using namespace clang; +#if defined(_AIX) || defined(__hexagon__) || \ + (defined(_WIN32) && \ + (defined(__aarch64__) || defined(_M_ARM64) || defined(__arm__))) +#define CLANG_INTERPRETER_NO_SUPPORT_EXEC +#endif + namespace { using Args = std::vector; static std::unique_ptr @@ -191,7 +197,7 @@ struct LLVMInitRAII { ~LLVMInitRAII() { llvm::llvm_shutdown(); } } LLVMInit; -#ifdef _AIX +#ifdef CLANG_INTERPRETER_NO_SUPPORT_EXEC TEST(IncrementalProcessing, DISABLED_FindMangledNameSymbol) { #else TEST(IncrementalProcessing, FindMangledNameSymbol) { @@ -253,7 +259,7 @@ static NamedDecl *LookupSingleName(Interpreter &Interp, const char *Name) { return R.getFoundDecl(); } -#ifdef _AIX +#ifdef CLANG_INTERPRETER_NO_SUPPORT_EXEC TEST(IncrementalProcessing, DISABLED_InstantiateTemplate) { #else TEST(IncrementalProcessing, InstantiateTemplate) {