From 085d794c5f54512bf76e8bc9f83b9fd5f5e97130 Mon Sep 17 00:00:00 2001 From: Peter Steinfeld Date: Wed, 10 Mar 2021 08:23:26 -0800 Subject: [PATCH] [flang] Make the symbol count used for collating symbols static I changed the declaration of symbolCount_ in the type Symbols to be static to avoid possible problems in the future when we might have multiple objects of type Symbols. Thanks to Peter for pointing out the need for this change. Differential Revision: https://reviews.llvm.org/D98357 --- flang/include/flang/Semantics/symbol.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flang/include/flang/Semantics/symbol.h b/flang/include/flang/Semantics/symbol.h index 571d4ccacfec..fb53c61c7d23 100644 --- a/flang/include/flang/Semantics/symbol.h +++ b/flang/include/flang/Semantics/symbol.h @@ -700,7 +700,7 @@ private: std::list blocks_; std::size_t nextIndex_{0}; blockType *currBlock_{nullptr}; - std::size_t symbolCount_ = 0; + static inline std::size_t symbolCount_ = 0; Symbol &Get() { if (nextIndex_ == 0) {