forked from OSchip/llvm-project
#include cleanups in GRExprEngine.cpp/GRExprEngine.h. Moved GRExprEngine to
clang namespace. llvm-svn: 47136
This commit is contained in:
parent
64de207c52
commit
bd8957b6b2
|
@ -14,6 +14,12 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "clang/Analysis/PathSensitive/GRExprEngine.h"
|
||||
#include "GRSimpleVals.h"
|
||||
|
||||
using namespace clang;
|
||||
using llvm::dyn_cast;
|
||||
using llvm::cast;
|
||||
using llvm::APSInt;
|
||||
|
||||
GRExprEngine::StateTy
|
||||
GRExprEngine::SetValue(StateTy St, Expr* S, const RValue& V) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//===-- GRExprEngine.cpp - Simple, Path-Sens. Constant Prop. -----*- C++ -*-==//
|
||||
//===-- GRExprEngine.h - Path-Sensitive Expression-Level Dataflow ---*- C++ -*-=
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
|
@ -7,10 +7,9 @@
|
|||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Constant Propagation via Graph Reachability
|
||||
//
|
||||
// This files defines
|
||||
//
|
||||
// This file defines a meta-engine for path-sensitive dataflow analysis that
|
||||
// is built on GREngine, but provides the boilerplate to execute transfer
|
||||
// functions and build the ExplodedGraph at the expression level.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
|
@ -43,16 +42,11 @@
|
|||
#include <sstream>
|
||||
#endif
|
||||
|
||||
using namespace clang;
|
||||
using llvm::dyn_cast;
|
||||
using llvm::cast;
|
||||
using llvm::APSInt;
|
||||
namespace clang {
|
||||
|
||||
namespace {
|
||||
class GRExprEngine {
|
||||
|
||||
class VISIBILITY_HIDDEN GRExprEngine {
|
||||
|
||||
public:
|
||||
public:
|
||||
typedef ValueStateManager::StateTy StateTy;
|
||||
typedef ExplodedGraph<GRExprEngine> GraphTy;
|
||||
typedef GraphTy::NodeTy NodeTy;
|
||||
|
@ -86,7 +80,7 @@ namespace {
|
|||
const_iterator end() const { return Impl.end(); }
|
||||
};
|
||||
|
||||
protected:
|
||||
protected:
|
||||
/// G - the simulation graph.
|
||||
GraphTy& G;
|
||||
|
||||
|
@ -131,7 +125,7 @@ namespace {
|
|||
|
||||
bool StateCleaned;
|
||||
|
||||
public:
|
||||
public:
|
||||
GRExprEngine(GraphTy& g) :
|
||||
G(g), Liveness(G.getCFG(), G.getFunctionDecl()),
|
||||
Builder(NULL),
|
||||
|
@ -334,5 +328,5 @@ namespace {
|
|||
LValue LHS, LValue RHS) {
|
||||
return TF->EvalBinaryOp(ValMgr, Op, LHS, RHS);
|
||||
}
|
||||
};
|
||||
} // end anonymous namespace
|
||||
};
|
||||
} // end clang namespace
|
Loading…
Reference in New Issue