diff options
Diffstat (limited to 'include/clang/Analysis/PathSensitive/Environment.h')
-rw-r--r-- | include/clang/Analysis/PathSensitive/Environment.h | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/include/clang/Analysis/PathSensitive/Environment.h b/include/clang/Analysis/PathSensitive/Environment.h index b96b1a77b6..6d5c5678e5 100644 --- a/include/clang/Analysis/PathSensitive/Environment.h +++ b/include/clang/Analysis/PathSensitive/Environment.h @@ -35,61 +35,61 @@ class LiveVariables; class Environment { private: friend class EnvironmentManager; - + // Type definitions. typedef llvm::ImmutableMap<const Stmt*,SVal> BindingsTy; // Data. BindingsTy ExprBindings; AnalysisContext *ACtx; - + Environment(BindingsTy eb, AnalysisContext *aCtx) : ExprBindings(eb), ACtx(aCtx) {} - -public: + +public: typedef BindingsTy::iterator iterator; iterator begin() const { return ExprBindings.begin(); } iterator end() const { return ExprBindings.end(); } - + SVal LookupExpr(const Stmt* E) const { const SVal* X = ExprBindings.lookup(E); return X ? *X : UnknownVal(); } - + SVal GetSVal(const Stmt* Ex, ValueManager& ValMgr) const; - + AnalysisContext &getAnalysisContext() const { return *ACtx; } - + /// Profile - Profile the contents of an Environment object for use /// in a FoldingSet. static void Profile(llvm::FoldingSetNodeID& ID, const Environment* E) { E->ExprBindings.Profile(ID); } - + /// Profile - Used to profile the contents of this object for inclusion /// in a FoldingSet. void Profile(llvm::FoldingSetNodeID& ID) const { Profile(ID, this); } - + bool operator==(const Environment& RHS) const { return ExprBindings == RHS.ExprBindings; } }; - + class EnvironmentManager { private: typedef Environment::BindingsTy::Factory FactoryTy; FactoryTy F; - -public: + +public: EnvironmentManager(llvm::BumpPtrAllocator& Allocator) : F(Allocator) {} ~EnvironmentManager() {} - + Environment getInitialEnvironment(AnalysisContext *ACtx) { return Environment(F.GetEmptyMap(), ACtx); } - + Environment BindExpr(Environment Env, const Stmt *S, SVal V, bool Invalidate); @@ -97,7 +97,7 @@ public: SymbolReaper &SymReaper, const GRState *ST, llvm::SmallVectorImpl<const MemRegion*>& RegionRoots); }; - + } // end clang namespace #endif |