forked from OSchip/llvm-project
[analyzer][NFC] Add RangeSet::dump
This tiny change improves the debugging experience of the solver a lot! Differential Revision: https://reviews.llvm.org/D110911
This commit is contained in:
parent
b096ac9092
commit
b8f6c85a83
|
@ -48,6 +48,7 @@ public:
|
|||
ID.AddPointer(&To());
|
||||
}
|
||||
void dump(raw_ostream &OS) const;
|
||||
void dump() const;
|
||||
|
||||
// In order to keep non-overlapping ranges sorted, we can compare only From
|
||||
// points.
|
||||
|
@ -282,6 +283,7 @@ public:
|
|||
bool contains(llvm::APSInt Point) const { return containsImpl(Point); }
|
||||
|
||||
void dump(raw_ostream &OS) const;
|
||||
void dump() const;
|
||||
|
||||
bool operator==(const RangeSet &Other) const { return *Impl == *Other.Impl; }
|
||||
bool operator!=(const RangeSet &Other) const { return !(*this == Other); }
|
||||
|
|
|
@ -494,15 +494,17 @@ RangeSet RangeSet::Factory::deletePoint(RangeSet From,
|
|||
return intersect(From, Upper, Lower);
|
||||
}
|
||||
|
||||
void Range::dump(raw_ostream &OS) const {
|
||||
LLVM_DUMP_METHOD void Range::dump(raw_ostream &OS) const {
|
||||
OS << '[' << toString(From(), 10) << ", " << toString(To(), 10) << ']';
|
||||
}
|
||||
LLVM_DUMP_METHOD void Range::dump() const { dump(llvm::errs()); }
|
||||
|
||||
void RangeSet::dump(raw_ostream &OS) const {
|
||||
LLVM_DUMP_METHOD void RangeSet::dump(raw_ostream &OS) const {
|
||||
OS << "{ ";
|
||||
llvm::interleaveComma(*this, OS, [&OS](const Range &R) { R.dump(OS); });
|
||||
OS << " }";
|
||||
}
|
||||
LLVM_DUMP_METHOD void RangeSet::dump() const { dump(llvm::errs()); }
|
||||
|
||||
REGISTER_SET_FACTORY_WITH_PROGRAMSTATE(SymbolSet, SymbolRef)
|
||||
|
||||
|
|
Loading…
Reference in New Issue