[PATCH] D108110: Fix LLVM_ENABLE_THREADS check from 26a92d5852b2c6bf77efd26f6c0194c913f40285

Alexander Richardson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 16 02:31:11 PDT 2021


arichardson created this revision.
arichardson added reviewers: aaron.ballman, rsmith.
Herald added a subscriber: dexonsmith.
arichardson requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

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?


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D108110

Files:
  clang/include/clang/Basic/Stack.h


Index: clang/include/clang/Basic/Stack.h
===================================================================
--- clang/include/clang/Basic/Stack.h
+++ clang/include/clang/Basic/Stack.h
@@ -39,7 +39,7 @@
   /// is insufficient, calls Diag to emit a diagnostic before calling Fn.
   inline void runWithSufficientStackSpace(llvm::function_ref<void()> Diag,
                                           llvm::function_ref<void()> Fn) {
-#ifdef LLVM_ENABLE_THREADS
+#if LLVM_ENABLE_THREADS
     if (LLVM_UNLIKELY(isStackNearlyExhausted()))
       runWithSufficientStackSpaceSlow(Diag, Fn);
     else


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108110.366573.patch
Type: text/x-patch
Size: 593 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210816/cfe33f79/attachment.bin>


More information about the cfe-commits mailing list