[clang] [llvm] Update llvm::Registry to work for LLVM shared library builds on windows (PR #109024)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 3 12:09:12 PDT 2024
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 46a76c33343c34c0eb5fa7ec849d0de42cfed412 f8e37cf5e9dfe85ca5a9081fc294329c3265aea1 --extensions h -- clang/include/clang/Basic/ParsedAttrInfo.h clang/include/clang/Frontend/FrontendPluginRegistry.h clang/include/clang/Lex/Preprocessor.h clang/include/clang/Tooling/CompilationDatabasePluginRegistry.h clang/include/clang/Tooling/ToolExecutorPluginRegistry.h llvm/include/llvm/CodeGen/GCMetadataPrinter.h llvm/include/llvm/IR/GCStrategy.h llvm/include/llvm/Support/Compiler.h llvm/include/llvm/Support/Registry.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/include/llvm/Support/Registry.h b/llvm/include/llvm/Support/Registry.h
index c80da1c5d3..2a3519b1b4 100644
--- a/llvm/include/llvm/Support/Registry.h
+++ b/llvm/include/llvm/Support/Registry.h
@@ -107,7 +107,7 @@ namespace llvm {
// begin is not defined here in order to avoid usage of an undefined static
// data member, instead it's instantiated by LLVM_INSTANTIATE_REGISTRY.
- static iterator begin() { return iterator(Head); }
+ static iterator begin() { return iterator(Head); }
static iterator end() { return iterator(nullptr); }
static iterator_range<iterator> entries() {
@@ -137,20 +137,20 @@ namespace llvm {
};
};
- template<typename T> typename Registry<T>::node *Registry<T>::Head = nullptr;
- template<typename T> typename Registry<T>::node *Registry<T>::Tail = nullptr;
+ template <typename T> typename Registry<T>::node *Registry<T>::Head = nullptr;
+ template <typename T> typename Registry<T>::node *Registry<T>::Tail = nullptr;
} // end namespace llvm
#ifdef _WIN32
/// Instantiate a registry class.
-#define LLVM_INSTANTIATE_REGISTRY(REGISTRY_CLASS) \
- namespace llvm { \
- template class LLVM_ABI_EXPORT Registry<REGISTRY_CLASS::type>;\
+#define LLVM_INSTANTIATE_REGISTRY(REGISTRY_CLASS) \
+ namespace llvm { \
+ template class LLVM_ABI_EXPORT Registry<REGISTRY_CLASS::type>; \
}
#else
-#define LLVM_INSTANTIATE_REGISTRY(REGISTRY_CLASS) \
- namespace llvm { \
- template class Registry<REGISTRY_CLASS>;\
+#define LLVM_INSTANTIATE_REGISTRY(REGISTRY_CLASS) \
+ namespace llvm { \
+ template class Registry<REGISTRY_CLASS>; \
}
#endif
``````````
</details>
https://github.com/llvm/llvm-project/pull/109024
More information about the cfe-commits
mailing list