diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-11-13 01:58:01 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-11-13 01:58:01 +0000 |
commit | f0d8fff0783e92ce0e4333d0fee2fe481d16ddd7 (patch) | |
tree | 79a23bd34fc4454326b5fe331cb774737c31ce6f /lib/Analysis/CFRefCount.cpp | |
parent | acfd1e5ea124ee1f6af74293ba5235771d237456 (diff) |
Pull static variable within function (for slightly faster startup time).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87065 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/CFRefCount.cpp')
-rw-r--r-- | lib/Analysis/CFRefCount.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp index 58642bf2a7..a0846b1abf 100644 --- a/lib/Analysis/CFRefCount.cpp +++ b/lib/Analysis/CFRefCount.cpp @@ -520,12 +520,14 @@ void RefVal::print(llvm::raw_ostream& Out) const { //===----------------------------------------------------------------------===// typedef llvm::ImmutableMap<SymbolRef, RefVal> RefBindings; -static int RefBIndex = 0; namespace clang { template<> struct GRStateTrait<RefBindings> : public GRStatePartialTrait<RefBindings> { - static inline void* GDMIndex() { return &RefBIndex; } + static void* GDMIndex() { + static int RefBIndex = 0; + return &RefBIndex; + } }; } |