[llvm-branch-commits] [cfe-branch] r71346 - in /cfe/branches/Apple/Dib: include/clang/Analysis/PathSensitive/SymbolManager.h include/clang/Analysis/PathSensitive/ValueManager.h lib/Analysis/BasicStore.cpp lib/Analysis/RegionStore.cpp lib/Analysis/SVals.cpp lib/Analysis/SymbolManager.cpp

Mike Stump mrs at apple.com
Fri May 8 23:25:34 PDT 2009


Author: mrs
Date: Sat May  9 01:25:34 2009
New Revision: 71346

URL: http://llvm.org/viewvc/llvm-project?rev=71346&view=rev
Log:
Merge in 71322:

Rename:
  SymbolRegionRValue => SymbolRegionValue
  SymExpr::RegionRValue => SymExpr::RegionValueKind

Modified:
    cfe/branches/Apple/Dib/include/clang/Analysis/PathSensitive/SymbolManager.h
    cfe/branches/Apple/Dib/include/clang/Analysis/PathSensitive/ValueManager.h
    cfe/branches/Apple/Dib/lib/Analysis/BasicStore.cpp
    cfe/branches/Apple/Dib/lib/Analysis/RegionStore.cpp
    cfe/branches/Apple/Dib/lib/Analysis/SVals.cpp
    cfe/branches/Apple/Dib/lib/Analysis/SymbolManager.cpp

Modified: cfe/branches/Apple/Dib/include/clang/Analysis/PathSensitive/SymbolManager.h
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/Dib/include/clang/Analysis/PathSensitive/SymbolManager.h?rev=71346&r1=71345&r2=71346&view=diff

==============================================================================
--- cfe/branches/Apple/Dib/include/clang/Analysis/PathSensitive/SymbolManager.h (original)
+++ cfe/branches/Apple/Dib/include/clang/Analysis/PathSensitive/SymbolManager.h Sat May  9 01:25:34 2009
@@ -38,7 +38,7 @@
   
 class SymExpr : public llvm::FoldingSetNode {
 public:
-  enum Kind { BEGIN_SYMBOLS, RegionRValue, ConjuredKind, END_SYMBOLS,
+  enum Kind { BEGIN_SYMBOLS, RegionValueKind, ConjuredKind, END_SYMBOLS,
               SymIntKind, SymSymKind };
 private:
   Kind K;
@@ -81,16 +81,16 @@
 
 typedef const SymbolData* SymbolRef;
   
-class SymbolRegionRValue : public SymbolData {
+class SymbolRegionValue : public SymbolData {
   const MemRegion *R;
 public:
-  SymbolRegionRValue(SymbolID sym, const MemRegion *r)
-    : SymbolData(RegionRValue, sym), R(r) {}
+  SymbolRegionValue(SymbolID sym, const MemRegion *r)
+    : SymbolData(RegionValueKind, sym), R(r) {}
   
   const MemRegion* getRegion() const { return R; }
 
   static void Profile(llvm::FoldingSetNodeID& profile, const MemRegion* R) {
-    profile.AddInteger((unsigned) RegionRValue);
+    profile.AddInteger((unsigned) RegionValueKind);
     profile.AddPointer(R);
   }
   
@@ -102,7 +102,7 @@
 
   // Implement isa<T> support.
   static inline bool classof(const SymExpr* SE) {
-    return SE->getKind() == RegionRValue;
+    return SE->getKind() == RegionValueKind;
   }
 };
 
@@ -204,7 +204,7 @@
   QualType getType(ASTContext& C) const { return T; }
 
   static void Profile(llvm::FoldingSetNodeID& ID, const SymExpr *lhs,
-                      BinaryOperator::Opcode op, const SymExpr *rhs, QualType t) {
+                    BinaryOperator::Opcode op, const SymExpr *rhs, QualType t) {
     ID.AddInteger((unsigned) SymSymKind);
     ID.AddPointer(lhs);
     ID.AddInteger(op);
@@ -240,7 +240,7 @@
   static bool canSymbolicate(QualType T);
 
   /// Make a unique symbol for MemRegion R according to its kind.
-  const SymbolRegionRValue* getRegionRValueSymbol(const MemRegion* R);
+  const SymbolRegionValue* getRegionValueSymbol(const MemRegion* R);
   const SymbolConjured* getConjuredSymbol(const Stmt* E, QualType T,
                                           unsigned VisitCount,
                                           const void* SymbolTag = 0);
@@ -250,7 +250,7 @@
     return getConjuredSymbol(E, E->getType(), VisitCount, SymbolTag);
   }
 
-  const SymIntExpr *getSymIntExpr(const SymExpr *lhs, BinaryOperator::Opcode op, 
+  const SymIntExpr *getSymIntExpr(const SymExpr *lhs, BinaryOperator::Opcode op,
                                   const llvm::APSInt& rhs, QualType t);
   
   const SymIntExpr *getSymIntExpr(const SymExpr &lhs, BinaryOperator::Opcode op,

Modified: cfe/branches/Apple/Dib/include/clang/Analysis/PathSensitive/ValueManager.h
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/Dib/include/clang/Analysis/PathSensitive/ValueManager.h?rev=71346&r1=71345&r2=71346&view=diff

==============================================================================
--- cfe/branches/Apple/Dib/include/clang/Analysis/PathSensitive/ValueManager.h (original)
+++ cfe/branches/Apple/Dib/include/clang/Analysis/PathSensitive/ValueManager.h Sat May  9 01:25:34 2009
@@ -80,8 +80,8 @@
   /// elements.
   SVal makeZeroArrayIndex();
 
-  /// GetRValueSymbolVal - make a unique symbol for value of R.
-  SVal getRValueSymbolVal(const MemRegion* R);
+  /// GetRegionValueSymbolVal - make a unique symbol for value of R.
+  SVal getRegionValueSymbolVal(const MemRegion* R);
   
   SVal getConjuredSymbolVal(const Expr *E, unsigned Count);  
   SVal getConjuredSymbolVal(const Expr* E, QualType T, unsigned Count);

Modified: cfe/branches/Apple/Dib/lib/Analysis/BasicStore.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/Dib/lib/Analysis/BasicStore.cpp?rev=71346&r1=71345&r2=71346&view=diff

==============================================================================
--- cfe/branches/Apple/Dib/lib/Analysis/BasicStore.cpp (original)
+++ cfe/branches/Apple/Dib/lib/Analysis/BasicStore.cpp Sat May  9 01:25:34 2009
@@ -487,7 +487,7 @@
         if (DR->getDecl() == SelfDecl) {
           const MemRegion *IVR = MRMgr.getObjCIvarRegion(IV->getDecl(),
                                                          SelfRegion);          
-          SVal X = ValMgr.getRValueSymbolVal(IVR);          
+          SVal X = ValMgr.getRegionValueSymbolVal(IVR);          
           St = BindInternal(St, Loc::MakeVal(IVR), X);
         }
       }
@@ -543,7 +543,7 @@
       const MemRegion *R = StateMgr.getRegion(VD);
       SVal X = (VD->hasGlobalStorage() || isa<ParmVarDecl>(VD) ||
                 isa<ImplicitParamDecl>(VD))
-            ? ValMgr.getRValueSymbolVal(R)
+            ? ValMgr.getRegionValueSymbolVal(R)
             : UndefinedVal();
 
       St = BindInternal(St, Loc::MakeVal(R), X);

Modified: cfe/branches/Apple/Dib/lib/Analysis/RegionStore.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/Dib/lib/Analysis/RegionStore.cpp?rev=71346&r1=71345&r2=71346&view=diff

==============================================================================
--- cfe/branches/Apple/Dib/lib/Analysis/RegionStore.cpp (original)
+++ cfe/branches/Apple/Dib/lib/Analysis/RegionStore.cpp Sat May  9 01:25:34 2009
@@ -824,7 +824,7 @@
     if (SR == SelfRegion) {
       // FIXME: Do we need to handle the case where the super region
       // has a view?  We want to canonicalize the bindings.
-      return ValMgr.getRValueSymbolVal(R);
+      return ValMgr.getRegionValueSymbolVal(R);
     }
     
     // Otherwise, we need a new symbol.  For now return Unknown.
@@ -846,7 +846,7 @@
         VD->hasGlobalStorage()) {
       QualType VTy = VD->getType();
       if (Loc::IsLocType(VTy) || VTy->isIntegerType())
-        return ValMgr.getRValueSymbolVal(VR);
+        return ValMgr.getRegionValueSymbolVal(VR);
       else
         return UnknownVal();
     }
@@ -862,7 +862,7 @@
 
   // All other integer values are symbolic.
   if (Loc::IsLocType(RTy) || RTy->isIntegerType())
-    return ValMgr.getRValueSymbolVal(R);
+    return ValMgr.getRegionValueSymbolVal(R);
   else
     return UnknownVal();
 }

Modified: cfe/branches/Apple/Dib/lib/Analysis/SVals.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/Dib/lib/Analysis/SVals.cpp?rev=71346&r1=71345&r2=71346&view=diff

==============================================================================
--- cfe/branches/Apple/Dib/lib/Analysis/SVals.cpp (original)
+++ cfe/branches/Apple/Dib/lib/Analysis/SVals.cpp Sat May  9 01:25:34 2009
@@ -297,8 +297,8 @@
   return nonloc::CompoundVal(BasicVals.getCompoundValData(T, Vals));
 }
 
-SVal ValueManager::getRValueSymbolVal(const MemRegion* R) {
-  SymbolRef sym = SymMgr.getRegionRValueSymbol(R);
+SVal ValueManager::getRegionValueSymbolVal(const MemRegion* R) {
+  SymbolRef sym = SymMgr.getRegionValueSymbol(R);
                                 
   if (const TypedRegion* TR = dyn_cast<TypedRegion>(R)) {
     QualType T = TR->getValueType(SymMgr.getContext());

Modified: cfe/branches/Apple/Dib/lib/Analysis/SymbolManager.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/Dib/lib/Analysis/SymbolManager.cpp?rev=71346&r1=71345&r2=71346&view=diff

==============================================================================
--- cfe/branches/Apple/Dib/lib/Analysis/SymbolManager.cpp (original)
+++ cfe/branches/Apple/Dib/lib/Analysis/SymbolManager.cpp Sat May  9 01:25:34 2009
@@ -65,7 +65,7 @@
 static void print(llvm::raw_ostream& os, const SymExpr *SE) {
   switch (SE->getKind()) {
     case SymExpr::BEGIN_SYMBOLS:
-    case SymExpr::RegionRValue:
+    case SymExpr::RegionValueKind:
     case SymExpr::ConjuredKind:
     case SymExpr::END_SYMBOLS:
       os << '$' << cast<SymbolData>(SE)->getSymbolID();
@@ -91,20 +91,20 @@
   return os;
 }
 
-const SymbolRegionRValue* 
-SymbolManager::getRegionRValueSymbol(const MemRegion* R) {
+const SymbolRegionValue* 
+SymbolManager::getRegionValueSymbol(const MemRegion* R) {
   llvm::FoldingSetNodeID profile;
-  SymbolRegionRValue::Profile(profile, R);
+  SymbolRegionValue::Profile(profile, R);
   void* InsertPos;  
   SymExpr *SD = DataSet.FindNodeOrInsertPos(profile, InsertPos);    
   if (!SD) {  
-    SD = (SymExpr*) BPAlloc.Allocate<SymbolRegionRValue>();
-    new (SD) SymbolRegionRValue(SymbolCounter, R);  
+    SD = (SymExpr*) BPAlloc.Allocate<SymbolRegionValue>();
+    new (SD) SymbolRegionValue(SymbolCounter, R);  
     DataSet.InsertNode(SD, InsertPos);
     ++SymbolCounter;
   }
   
-  return cast<SymbolRegionRValue>(SD);
+  return cast<SymbolRegionValue>(SD);
 }
 
 const SymbolConjured*
@@ -165,7 +165,7 @@
   return T;
 }
 
-QualType SymbolRegionRValue::getType(ASTContext& C) const {
+QualType SymbolRegionValue::getType(ASTContext& C) const {
   if (const TypedRegion* TR = dyn_cast<TypedRegion>(R))
     return TR->getValueType(C);
   
@@ -197,7 +197,7 @@
   
   // Interogate the symbol.  It may derive from an input value to
   // the analyzed function/method.
-  return isa<SymbolRegionRValue>(sym);
+  return isa<SymbolRegionValue>(sym);
 }
 
 SymbolVisitor::~SymbolVisitor() {}





More information about the llvm-branch-commits mailing list