]> granicus.if.org Git - clang/commitdiff
Implement dumpToStream() for NonStaticGlobalSpaceRegion and StaticGlobalSpaceRegion.
authorTed Kremenek <kremenek@apple.com>
Tue, 6 Jul 2010 23:37:21 +0000 (23:37 +0000)
committerTed Kremenek <kremenek@apple.com>
Tue, 6 Jul 2010 23:37:21 +0000 (23:37 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107731 91177308-0d34-0410-b5e6-96231b3b80d8

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

index 48a7ad2aab1e925196b28c26886ec5707b9d59f8..feb4b7218a7e9c0b62d9a66a54706872e9d0a371 100644 (file)
@@ -172,6 +172,8 @@ class StaticGlobalSpaceRegion : public GlobalsSpaceRegion {
 public:
   void Profile(llvm::FoldingSetNodeID &ID) const;
   
+  void dumpToStream(llvm::raw_ostream& os) const;
+
   const CodeTextRegion *getCodeRegion() const { return CR; }
 
   static bool classof(const MemRegion *R) {
@@ -186,6 +188,9 @@ class NonStaticGlobalSpaceRegion : public GlobalsSpaceRegion {
     : GlobalsSpaceRegion(mgr, NonStaticGlobalSpaceRegionKind) {}
   
 public:
+
+  void dumpToStream(llvm::raw_ostream& os) const;
+
   static bool classof(const MemRegion *R) {
     return R->getKind() == NonStaticGlobalSpaceRegionKind;
   }
index b0e57fd251eccd323e14e0e3c28b8d332f24a131..9cfeb7ae2b5cbbb6246c40dee7df4c23a47d3759 100644 (file)
@@ -402,7 +402,6 @@ void BlockDataRegion::dumpToStream(llvm::raw_ostream& os) const {
   os << "block_data{" << BC << '}';
 }
 
-
 void CompoundLiteralRegion::dumpToStream(llvm::raw_ostream& os) const {
   // FIXME: More elaborate pretty-printing.
   os << "{ " << (void*) CL <<  " }";
@@ -421,6 +420,10 @@ void FieldRegion::dumpToStream(llvm::raw_ostream& os) const {
   os << superRegion << "->" << getDecl();
 }
 
+void NonStaticGlobalSpaceRegion::dumpToStream(llvm::raw_ostream &os) const {
+  os << "NonStaticGlobalSpaceRegion";
+}
+
 void ObjCIvarRegion::dumpToStream(llvm::raw_ostream& os) const {
   os << "ivar{" << superRegion << ',' << getDecl() << '}';
 }
@@ -445,6 +448,10 @@ void RegionRawOffset::dumpToStream(llvm::raw_ostream& os) const {
   os << "raw_offset{" << getRegion() << ',' << getByteOffset() << '}';
 }
 
+void StaticGlobalSpaceRegion::dumpToStream(llvm::raw_ostream &os) const {
+  os << "StaticGlobalsMemSpace{" << CR << '}';
+}
+
 //===----------------------------------------------------------------------===//
 // MemRegionManager methods.
 //===----------------------------------------------------------------------===//