summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/CFRefCount.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-11-13 01:58:01 +0000
committerTed Kremenek <kremenek@apple.com>2009-11-13 01:58:01 +0000
commit3c5571801659ed52e1df40b7b0bc4d8a7e7dc6d7 (patch)
tree29aff5e47184cc3ccb185d0028d2d92f58079d5c /clang/lib/Analysis/CFRefCount.cpp
parent83066c8dee02e9a7071a607cf162e087c47013ab (diff)
downloadbcm5719-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.cpp6
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;
+ }
};
}
OpenPOWER on IntegriCloud