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 | 3c5571801659ed52e1df40b7b0bc4d8a7e7dc6d7 (patch) | |
tree | 29aff5e47184cc3ccb185d0028d2d92f58079d5c /clang/lib/Analysis/CFRefCount.cpp | |
parent | 83066c8dee02e9a7071a607cf162e087c47013ab (diff) | |
download | bcm5719-llvm-3c5571801659ed52e1df40b7b0bc4d8a7e7dc6d7.tar.gz bcm5719-llvm-3c5571801659ed52e1df40b7b0bc4d8a7e7dc6d7.zip |
Pull static variable within function (for slightly faster startup time).
llvm-svn: 87065
Diffstat (limited to 'clang/lib/Analysis/CFRefCount.cpp')
-rw-r--r-- | clang/lib/Analysis/CFRefCount.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Analysis/CFRefCount.cpp b/clang/lib/Analysis/CFRefCount.cpp index 58642bf2a77..a0846b1abf5 100644 --- a/clang/lib/Analysis/CFRefCount.cpp +++ b/clang/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; + } }; } |