From 2e8123e5bb8c4e3b5f431edfc687bfd7f17549ea Mon Sep 17 00:00:00 2001 From: Zhongxing Xu Date: Tue, 9 Dec 2008 10:51:19 +0000 Subject: [PATCH] Add utility method. Remove an unused method. llvm-svn: 60758 --- clang/include/clang/Analysis/PathSensitive/SVals.h | 4 ++-- clang/lib/Analysis/SVals.cpp | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/clang/include/clang/Analysis/PathSensitive/SVals.h b/clang/include/clang/Analysis/PathSensitive/SVals.h index 70824eb561d0..361e321823c7 100644 --- a/clang/include/clang/Analysis/PathSensitive/SVals.h +++ b/clang/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/clang/lib/Analysis/SVals.cpp b/clang/lib/Analysis/SVals.cpp index 6ee311c0dde0..3288b74a993a 100644 --- a/clang/lib/Analysis/SVals.cpp +++ b/clang/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()); } //===----------------------------------------------------------------------===//