[llvm] f7fdc8d - [llvm][Support] Disable runOnNewStack test when threading is disabled
David Spickett via llvm-commits
llvm-commits at lists.llvm.org
Fri May 2 02:53:07 PDT 2025
Author: David Spickett
Date: 2025-05-02T09:52:47Z
New Revision: f7fdc8d0cf7cd5caa7d463e1e80e0d5a08c71bb2
URL: https://github.com/llvm/llvm-project/commit/f7fdc8d0cf7cd5caa7d463e1e80e0d5a08c71bb2
DIFF: https://github.com/llvm/llvm-project/commit/f7fdc8d0cf7cd5caa7d463e1e80e0d5a08c71bb2.diff
LOG: [llvm][Support] Disable runOnNewStack test when threading is disabled
On our buildbot https://lab.llvm.org/buildbot/#/builders/122/builds/1478,
one of the new tests added by https://github.com/llvm/llvm-project/pull/136046
failed.
This is because on non-Apple Silicon platforms, the implementation
is to start a new thread, but when threading is disabled this is the
same as calling a function normally.
Added:
Modified:
llvm/unittests/Support/ProgramStackTest.cpp
Removed:
################################################################################
diff --git a/llvm/unittests/Support/ProgramStackTest.cpp b/llvm/unittests/Support/ProgramStackTest.cpp
index 31dfb3b88ade6..2321751c539fe 100644
--- a/llvm/unittests/Support/ProgramStackTest.cpp
+++ b/llvm/unittests/Support/ProgramStackTest.cpp
@@ -12,6 +12,10 @@
using namespace llvm;
+// One way of running on a new stack is to start a new thread. When threading
+// is disabled a "new thread" is implemented as simply calling the function.
+#if LLVM_ENABLE_THREADS
+
static uintptr_t func(int &A) {
A = 7;
return getStackPointer();
@@ -33,3 +37,5 @@ TEST(ProgramStackTest, runOnNewStack) {
runOnNewStack(0, function_ref<void(int &)>(func2), A);
EXPECT_EQ(A, 5);
}
+
+#endif /*if LLVM_ENABLE_THREADS */
\ No newline at end of file
More information about the llvm-commits
mailing list