forked from OSchip/llvm-project
Refactor pieces of PathDiagnostic into its own data structure. No functionality change.
llvm-svn: 150053
This commit is contained in:
parent
c03bdd9c80
commit
3116c4e5cd
|
@ -44,6 +44,12 @@ class ExplodedNode;
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
class PathDiagnostic;
|
||||
class PathDiagnosticPiece;
|
||||
|
||||
class PathPieces : public std::deque<PathDiagnosticPiece *> {
|
||||
public:
|
||||
~PathPieces();
|
||||
};
|
||||
|
||||
class PathDiagnosticConsumer {
|
||||
virtual void anchor();
|
||||
|
@ -475,7 +481,7 @@ public:
|
|||
/// diagnostic. It represents an ordered-collection of PathDiagnosticPieces,
|
||||
/// each which represent the pieces of the path.
|
||||
class PathDiagnostic : public llvm::FoldingSetNode {
|
||||
std::deque<PathDiagnosticPiece*> path;
|
||||
PathPieces path;
|
||||
unsigned Size;
|
||||
std::string BugType;
|
||||
std::string Desc;
|
||||
|
|
|
@ -62,10 +62,12 @@ PathDiagnosticMacroPiece::~PathDiagnosticMacroPiece() {
|
|||
|
||||
PathDiagnostic::PathDiagnostic() : Size(0) {}
|
||||
|
||||
PathDiagnostic::~PathDiagnostic() {
|
||||
for (iterator I = begin(), E = end(); I != E; ++I) delete &*I;
|
||||
PathPieces::~PathPieces() {
|
||||
for (iterator I = begin(), E = end(); I != E; ++I) delete *I;
|
||||
}
|
||||
|
||||
PathDiagnostic::~PathDiagnostic() {}
|
||||
|
||||
void PathDiagnostic::resetPath(bool deletePieces) {
|
||||
Size = 0;
|
||||
|
||||
|
|
Loading…
Reference in New Issue