]> granicus.if.org Git - clang/commitdiff
Recommit 69694 but this time also include the header changes (sorry for breaking
authorTed Kremenek <kremenek@apple.com>
Tue, 21 Apr 2009 19:56:58 +0000 (19:56 +0000)
committerTed Kremenek <kremenek@apple.com>
Tue, 21 Apr 2009 19:56:58 +0000 (19:56 +0000)
the build).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69702 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Analysis/PathSensitive/MemRegion.h
lib/Analysis/MemRegion.cpp

index 3f287a0eb05a0e84b0104f4b7ccbfb410c45caf7..7397c9213804db7b7c7dc7a388954b54d27ef884 100644 (file)
@@ -223,7 +223,14 @@ public:
     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;
 
index 5e71924bf9cedd029d22febcee0d615d8265921a..ad7e80d7249c88efae964fed8c14ad668cbca70f 100644 (file)
@@ -157,6 +157,16 @@ void AllocaRegion::print(llvm::raw_ostream& os) const {
   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 <<  " }";