https://github.com/anutosh491 updated 
https://github.com/llvm/llvm-project/pull/154513

>From e5b449adbd6b4fad167ac700287591a4a8772c7b Mon Sep 17 00:00:00 2001
From: anutosh491 <andersonbhat...@gmail.com>
Date: Wed, 20 Aug 2025 16:18:43 +0530
Subject: [PATCH] Fix InstantiateTemplate & Value test while building against
 emscripten

---
 clang/unittests/Interpreter/CMakeLists.txt      |  5 +++++
 clang/unittests/Interpreter/InterpreterTest.cpp | 16 ----------------
 2 files changed, 5 insertions(+), 16 deletions(-)

diff --git a/clang/unittests/Interpreter/CMakeLists.txt 
b/clang/unittests/Interpreter/CMakeLists.txt
index b6825f9461ad7..db9f80d9f53fe 100644
--- a/clang/unittests/Interpreter/CMakeLists.txt
+++ b/clang/unittests/Interpreter/CMakeLists.txt
@@ -60,6 +60,11 @@ target_link_options(ClangReplInterpreterTests
   PUBLIC "SHELL: -s STACK_SIZE=32mb"
   PUBLIC "SHELL: -s INITIAL_MEMORY=128mb"
   PUBLIC "SHELL: --emrun"
+  PUBLIC "SHELL: -Wl,--export=__clang_Interpreter_SetValueWithAlloc"
+  PUBLIC "SHELL: -Wl,--export=__clang_Interpreter_SetValueNoAlloc"
+  PUBLIC "SHELL: -Wl,--export=_ZnwmPv26__clang_Interpreter_NewTag"
+  PUBLIC "SHELL: -Wl,--export=_Z9getGlobalv"
+  PUBLIC "SHELL: -Wl,--export=_Z9setGlobali"
 )
 set_target_properties(ClangReplInterpreterTests PROPERTIES
   SUFFIX ".html"
diff --git a/clang/unittests/Interpreter/InterpreterTest.cpp 
b/clang/unittests/Interpreter/InterpreterTest.cpp
index 8639fb668f1fe..9ff9092524d21 100644
--- a/clang/unittests/Interpreter/InterpreterTest.cpp
+++ b/clang/unittests/Interpreter/InterpreterTest.cpp
@@ -264,14 +264,6 @@ static NamedDecl *LookupSingleName(Interpreter &Interp, 
const char *Name) {
 }
 
 TEST_F(InterpreterTest, InstantiateTemplate) {
-// FIXME : This test doesn't current work for Emscripten builds.
-// It should be possible to make it work.For details on how it fails and
-// the current progress to enable this test see
-// the following Github issue https: //
-// github.com/llvm/llvm-project/issues/153461
-#ifdef __EMSCRIPTEN__
-  GTEST_SKIP() << "Test fails for Emscipten builds";
-#endif
   // FIXME: We cannot yet handle delayed template parsing. If we run with
   // -fdelayed-template-parsing we try adding the newly created decl to the
   // active PTU which causes an assert.
@@ -311,14 +303,6 @@ TEST_F(InterpreterTest, InstantiateTemplate) {
 }
 
 TEST_F(InterpreterTest, Value) {
-// FIXME : This test doesn't current work for Emscripten builds.
-// It should be possible to make it work.For details on how it fails and
-// the current progress to enable this test see
-// the following Github issue https: //
-// github.com/llvm/llvm-project/issues/153461
-#ifdef __EMSCRIPTEN__
-  GTEST_SKIP() << "Test fails for Emscipten builds";
-#endif
   std::vector<const char *> Args = {"-fno-sized-deallocation"};
   std::unique_ptr<Interpreter> Interp = createInterpreter(Args);
 

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to