diff options
| author | Kazu Hirata <kazu@google.com> | 2025-09-24 08:44:38 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-24 08:44:38 -0700 |
| commit | 21ce61bcdebf561d0a7bbcfd12be32a0b51f4ba2 (patch) | |
| tree | 1d16dbf04c1b31701e22e48eb071c881c910f728 | |
| parent | 3b5c6bfc6abbc8c11f386a68f66eceafc3bb786c (diff) | |
| download | llvm-21ce61bcdebf561d0a7bbcfd12be32a0b51f4ba2.zip llvm-21ce61bcdebf561d0a7bbcfd12be32a0b51f4ba2.tar.gz llvm-21ce61bcdebf561d0a7bbcfd12be32a0b51f4ba2.tar.bz2 | |
[ADT] Use "static inline" to initialize EmptyDivergenceDesc; (NFC) (#160445)
In C++17, we can initialize a static member variable with "static
inline" as part of the class definition. With this, we can eliminate
the out-of-line static initializer involving boilerplate template
code.
| -rw-r--r-- | llvm/include/llvm/ADT/GenericUniformityImpl.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/llvm/include/llvm/ADT/GenericUniformityImpl.h b/llvm/include/llvm/ADT/GenericUniformityImpl.h index 3b9b7f2..141816c3 100644 --- a/llvm/include/llvm/ADT/GenericUniformityImpl.h +++ b/llvm/include/llvm/ADT/GenericUniformityImpl.h @@ -310,7 +310,7 @@ public: const DivergenceDescriptor &getJoinBlocks(const BlockT *DivTermBlock); private: - static DivergenceDescriptor EmptyDivergenceDesc; + static inline DivergenceDescriptor EmptyDivergenceDesc; ModifiedPO CyclePO; @@ -742,10 +742,6 @@ public: }; template <typename ContextT> -typename llvm::GenericSyncDependenceAnalysis<ContextT>::DivergenceDescriptor - llvm::GenericSyncDependenceAnalysis<ContextT>::EmptyDivergenceDesc; - -template <typename ContextT> llvm::GenericSyncDependenceAnalysis<ContextT>::GenericSyncDependenceAnalysis( const ContextT &Context, const DominatorTreeT &DT, const CycleInfoT &CI) : CyclePO(Context), DT(DT), CI(CI) { |
