[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.
This commit is contained in:
parent
461255e0c1
commit
f7fdc8d0cf
@ -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 */
|
||||
Loading…
x
Reference in New Issue
Block a user