llvm.org GIT mirror llvm / 2ece4de
Remove debugging code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121738 91177308-0d34-0410-b5e6-96231b3b80d8 Jakob Stoklund Olesen 9 years ago
1 changed file(s) with 0 addition(s) and 66 deletion(s). Raw diff Collapse all Expand all
103103 #include "llvm/Support/Allocator.h"
104104 #include "llvm/Support/RecyclingAllocator.h"
105105 #include
106
107 // FIXME: Remove debugging code.
108 #include "llvm/Support/raw_ostream.h"
109106
110107 namespace llvm {
111108
589586 }
590587
591588 unsigned insertFrom(unsigned &Pos, unsigned Size, KeyT a, KeyT b, ValT y);
592
593 #ifndef NDEBUG
594 void dump(raw_ostream &OS, unsigned Size) {
595 OS << " N" << this << " [shape=record label=\"{ " << Size << '/' << N;
596 for (unsigned i = 0; i != Size; ++i)
597 OS << " | {" << start(i) << '-' << stop(i) << "|" << value(i) << '}';
598 OS << "}\"];\n";
599 }
600 #endif
601
602589 };
603590
604591 /// insertFrom - Add mapping of [a;b] to y if possible, coalescing as much as
742729 subtree(i) = Node;
743730 stop(i) = Stop;
744731 }
745
746 #ifndef NDEBUG
747 void dump(raw_ostream &OS, unsigned Size) {
748 OS << " N" << this << " [shape=record label=\"" << Size << '/' << N;
749 for (unsigned i = 0; i != Size; ++i)
750 OS << " | " << stop(i);
751 OS << "\"];\n";
752 for (unsigned i = 0; i != Size; ++i)
753 OS << " N" << this << ":s" << i << " -> N"
754 << &subtree(i).template get() << ";\n";
755 }
756 #endif
757
758732 };
759733
760734 //===----------------------------------------------------------------------===//
921895 moveLeft(Level);
922896 ++path[Level].offset;
923897 }
924
925 #ifndef NDEBUG
926 void dump() const {
927 for (unsigned l = 0, e = path.size(); l != e; ++l)
928 errs() << l << ": " << path[l].node << ' ' << path[l].size << ' '
929 << path[l].offset << '\n';
930 }
931 #endif
932898 };
933899
934900 } // namespace IntervalMapImpl
11541120 I.find(x);
11551121 return I;
11561122 }
1157
1158 #ifndef NDEBUG
1159 raw_ostream *OS;
1160 void dump();
1161 void dumpNode(IntervalMapImpl::NodeRef Node, unsigned Height);
1162 #endif
11631123 };
11641124
11651125 /// treeSafeLookup - Return the mapped value at x or NotFound, assuming a
13021262 }
13031263 rootSize = 0;
13041264 }
1305
1306 #ifndef NDEBUG
1307 template
1308 void IntervalMap::
1309 dumpNode(IntervalMapImpl::NodeRef Node, unsigned Height) {
1310 if (Height)
1311 Node.get().dump(*OS, Node.size());
1312 else
1313 Node.get().dump(*OS, Node.size());
1314 }
1315
1316 template
1317 void IntervalMap::
1318 dump() {
1319 std::string errors;
1320 raw_fd_ostream ofs("tree.dot", errors);
1321 OS = &ofs;
1322 ofs << "digraph {\n";
1323 if (branched())
1324 rootBranch().dump(ofs, rootSize);
1325 else
1326 rootLeaf().dump(ofs, rootSize);
1327 visitNodes(&IntervalMap::dumpNode);
1328 ofs << "}\n";
1329 }
1330 #endif
13311265
13321266 //===----------------------------------------------------------------------===//
13331267 //--- IntervalMap::const_iterator ----//