[cfe-commits] r69702 - in /cfe/trunk: include/clang/Analysis/PathSensitive/MemRegion.h lib/Analysis/MemRegion.cpp

Ted Kremenek kremenek at apple.com
Tue Apr 21 12:56:59 PDT 2009


Author: kremenek
Date: Tue Apr 21 14:56:58 2009
New Revision: 69702

URL: http://llvm.org/viewvc/llvm-project?rev=69702&view=rev
Log:
Recommit 69694 but this time also include the header changes (sorry for breaking
the build).

Modified:
    cfe/trunk/include/clang/Analysis/PathSensitive/MemRegion.h
    cfe/trunk/lib/Analysis/MemRegion.cpp

Modified: cfe/trunk/include/clang/Analysis/PathSensitive/MemRegion.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/PathSensitive/MemRegion.h?rev=69702&r1=69701&r2=69702&view=diff

==============================================================================
--- cfe/trunk/include/clang/Analysis/PathSensitive/MemRegion.h (original)
+++ cfe/trunk/include/clang/Analysis/PathSensitive/MemRegion.h Tue Apr 21 14:56:58 2009
@@ -223,7 +223,14 @@
     return static_cast<const FunctionDecl*>(Data);
   }
   
-  virtual bool isBoundable(ASTContext&) const { return false; }
+  SymbolRef getSymbol() const {
+    assert(codekind == Symbolic);
+    return const_cast<SymbolRef>(static_cast<const SymbolRef>(Data));
+  }
+  
+  bool isBoundable(ASTContext&) const { return false; }
+  
+  virtual void print(llvm::raw_ostream& os) const;
 
   void Profile(llvm::FoldingSetNodeID& ID) const;
 

Modified: cfe/trunk/lib/Analysis/MemRegion.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/MemRegion.cpp?rev=69702&r1=69701&r2=69702&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/MemRegion.cpp (original)
+++ cfe/trunk/lib/Analysis/MemRegion.cpp Tue Apr 21 14:56:58 2009
@@ -157,6 +157,16 @@
   os << "alloca{" << (void*) Ex << ',' << Cnt << '}';
 }
 
+void CodeTextRegion::print(llvm::raw_ostream& os) const {
+  os << "code{";
+  if (isDeclared())
+    os << getDecl()->getDeclName();
+  else
+    os << '$' << getSymbol();
+
+  os << '}';
+}
+
 void CompoundLiteralRegion::print(llvm::raw_ostream& os) const {
   // FIXME: More elaborate pretty-printing.
   os << "{ " << (void*) CL <<  " }";





More information about the cfe-commits mailing list