From: Zhongxing Xu Date: Tue, 9 Dec 2008 10:51:19 +0000 (+0000) Subject: Add utility method. Remove an unused method. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2fdf555af136cb017f4dc0c26d5d3415d122e1ff;p=clang Add utility method. Remove an unused method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60758 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Analysis/PathSensitive/SVals.h b/include/clang/Analysis/PathSensitive/SVals.h index 70824eb561..361e321823 100644 --- a/include/clang/Analysis/PathSensitive/SVals.h +++ b/include/clang/Analysis/PathSensitive/SVals.h @@ -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 support. static inline bool classof(const SVal* V) { return V->getBaseKind() == LocKind; diff --git a/lib/Analysis/SVals.cpp b/lib/Analysis/SVals.cpp index 6ee311c0dd..3288b74a99 100644 --- a/lib/Analysis/SVals.cpp +++ b/lib/Analysis/SVals.cpp @@ -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()); } //===----------------------------------------------------------------------===//