Add utility method. Remove an unused method.

llvm-svn: 60758
This commit is contained in:
Zhongxing Xu 2008-12-09 10:51:19 +00:00
parent 3812542a2c
commit 2e8123e5bb
2 changed files with 4 additions and 2 deletions

View File

@ -208,11 +208,11 @@ protected:
public:
void print(llvm::raw_ostream& Out) const;
static Loc MakeVal(const MemRegion* R);
static Loc MakeVal(AddrLabelExpr* E);
static Loc MakeVal(StringLiteral* S);
// Implement isa<T> support.
static inline bool classof(const SVal* V) {
return V->getBaseKind() == LocKind;

View File

@ -316,6 +316,8 @@ nonloc::LocAsInteger nonloc::LocAsInteger::Make(BasicValueFactory& Vals, Loc V,
// Utility methods for constructing Locs.
//===----------------------------------------------------------------------===//
Loc Loc::MakeVal(const MemRegion* R) { return loc::MemRegionVal(R); }
Loc Loc::MakeVal(AddrLabelExpr* E) { return loc::GotoLabel(E->getLabel()); }
//===----------------------------------------------------------------------===//