Pull static variable within function (for slightly faster startup time).

llvm-svn: 87065
This commit is contained in:
Ted Kremenek 2009-11-13 01:58:01 +00:00
parent 83066c8dee
commit 3c55718016
1 changed files with 4 additions and 2 deletions

View File

@ -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;
}
};
}