We should be using #if instead of #ifdef here since LLVM_ENABLE_THREADS
is set using #cmakedefine01 so is always defined.
Since the other branch has never been used I wonder if we should just remove it instead?
Differential D108110
Fix LLVM_ENABLE_THREADS check from 26a92d5852b2c6bf77efd26f6c0194c913f40285 arichardson on Aug 16 2021, 2:31 AM. Authored by
Details We should be using #if instead of #ifdef here since LLVM_ENABLE_THREADS Since the other branch has never been used I wonder if we should just remove it instead?
Diff Detail
Event TimelineComment Actions LGTM!
I don't think removing the other branch entirely is a good approach because then the call will silently be a noop when threads are disabled. I'd rather we keep the support, or turn the other branch into a loud breakage so that callers of it find out at compile time that it's not supported when threads are disabled. |