[cfe-commits] r87065 - /cfe/trunk/lib/Analysis/CFRefCount.cpp
Ted Kremenek
kremenek at apple.com
Thu Nov 12 17:58:01 PST 2009
Author: kremenek
Date: Thu Nov 12 19:58:01 2009
New Revision: 87065
URL: http://llvm.org/viewvc/llvm-project?rev=87065&view=rev
Log:
Pull static variable within function (for slightly faster startup time).
Modified:
cfe/trunk/lib/Analysis/CFRefCount.cpp
Modified: cfe/trunk/lib/Analysis/CFRefCount.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CFRefCount.cpp?rev=87065&r1=87064&r2=87065&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/CFRefCount.cpp (original)
+++ cfe/trunk/lib/Analysis/CFRefCount.cpp Thu Nov 12 19:58:01 2009
@@ -520,12 +520,14 @@
//===----------------------------------------------------------------------===//
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;
+ }
};
}
More information about the cfe-commits
mailing list