[lld] [lld] lld::makeThreadLocal: omit `thread_local` when threads disabled (PR #72057)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 12 09:34:13 PST 2023
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff ff36411b23e55d71a45088c30540e228e9ca6973 3c34949b4a0c7ec19eac52bd652cd80e9e7b8bfc -- lld/include/lld/Common/Memory.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/lld/include/lld/Common/Memory.h b/lld/include/lld/Common/Memory.h
index 23e8737bcc..412fe88da0 100644
--- a/lld/include/lld/Common/Memory.h
+++ b/lld/include/lld/Common/Memory.h
@@ -65,11 +65,11 @@ template <typename T, typename... U> T *make(U &&... args) {
template <typename T>
inline llvm::SpecificBumpPtrAllocator<T> &
getSpecificAllocSingletonThreadLocal() {
- #if LLVM_ENABLE_THREADS
+#if LLVM_ENABLE_THREADS
thread_local SpecificAlloc<T> instance;
- #else
+#else
static SpecificAlloc<T> instance;
- #endif
+#endif
return instance.alloc;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/72057
More information about the llvm-commits
mailing list