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


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
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D108110: Fix ... Alexander Richardson via Phabricator via cfe-commits

Reply via email to