summaryrefslogtreecommitdiffstats
path: root/include/clang/AST/Stmt.h
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2010-09-17 15:54:40 +0000
committerdim <dim@FreeBSD.org>2010-09-17 15:54:40 +0000
commit36c49e3f258dced101949edabd72e9bc3f1dedc4 (patch)
tree0bbe07708f7571f8b5291f6d7b96c102b7c99dee /include/clang/AST/Stmt.h
parentfc84956ac8b7cd244ef30e7a4d4d38a58dec5904 (diff)
downloadFreeBSD-src-36c49e3f258dced101949edabd72e9bc3f1dedc4.zip
FreeBSD-src-36c49e3f258dced101949edabd72e9bc3f1dedc4.tar.gz
Vendor import of clang r114020 (from the release_28 branch):
http://llvm.org/svn/llvm-project/cfe/branches/release_28@114020 Approved by: rpaulo (mentor)
Diffstat (limited to 'include/clang/AST/Stmt.h')
-rw-r--r--include/clang/AST/Stmt.h37
1 files changed, 1 insertions, 36 deletions
diff --git a/include/clang/AST/Stmt.h b/include/clang/AST/Stmt.h
index a0c95b1..62a6b64 100644
--- a/include/clang/AST/Stmt.h
+++ b/include/clang/AST/Stmt.h
@@ -151,22 +151,11 @@ public:
struct EmptyShell { };
protected:
- /// DestroyChildren - Invoked by destructors of subclasses of Stmt to
- /// recursively release child AST nodes.
- void DestroyChildren(ASTContext& Ctx);
-
/// \brief Construct an empty statement.
explicit Stmt(StmtClass SC, EmptyShell) : sClass(SC), RefCount(1) {
if (Stmt::CollectingStats()) Stmt::addStmtClass(SC);
}
- /// \brief Virtual method that performs the actual destruction of
- /// this statement.
- ///
- /// Subclasses should override this method (not Destroy()) to
- /// provide class-specific destruction.
- virtual void DoDestroy(ASTContext &Ctx);
-
public:
Stmt(StmtClass SC) : sClass(SC), RefCount(1) {
if (Stmt::CollectingStats()) Stmt::addStmtClass(SC);
@@ -181,13 +170,6 @@ public:
}
#endif
- /// \brief Destroy the current statement and its children.
- void Destroy(ASTContext &Ctx) {
- assert(RefCount >= 1);
- if (--RefCount == 0)
- DoDestroy(Ctx);
- }
-
/// \brief Increases the reference count for this statement.
///
/// Invoke the Retain() operation when this statement or expression
@@ -221,6 +203,7 @@ public:
/// This is useful in a debugger.
void dump() const;
void dump(SourceManager &SM) const;
+ void dump(llvm::raw_ostream &OS, SourceManager &SM) const;
/// dumpAll - This does a dump of the specified AST fragment and all subtrees.
void dumpAll() const;
@@ -295,9 +278,6 @@ class DeclStmt : public Stmt {
DeclGroupRef DG;
SourceLocation StartLoc, EndLoc;
-protected:
- virtual void DoDestroy(ASTContext &Ctx);
-
public:
DeclStmt(DeclGroupRef dg, SourceLocation startLoc,
SourceLocation endLoc) : Stmt(DeclStmtClass), DG(dg),
@@ -671,9 +651,6 @@ public:
// over the initialization expression referenced by the condition variable.
virtual child_iterator child_begin();
virtual child_iterator child_end();
-
-protected:
- virtual void DoDestroy(ASTContext &Ctx);
};
/// SwitchStmt - This represents a 'switch' stmt.
@@ -685,9 +662,6 @@ class SwitchStmt : public Stmt {
SwitchCase *FirstCase;
SourceLocation SwitchLoc;
-protected:
- virtual void DoDestroy(ASTContext &Ctx);
-
public:
SwitchStmt(ASTContext &C, VarDecl *Var, Expr *cond);
@@ -794,9 +768,6 @@ public:
// Iterators
virtual child_iterator child_begin();
virtual child_iterator child_end();
-
-protected:
- virtual void DoDestroy(ASTContext &Ctx);
};
/// DoStmt - This represents a 'do/while' stmt.
@@ -910,9 +881,6 @@ public:
// Iterators
virtual child_iterator child_begin();
virtual child_iterator child_end();
-
-protected:
- virtual void DoDestroy(ASTContext &Ctx);
};
/// GotoStmt - This represents a direct goto.
@@ -1113,9 +1081,6 @@ class AsmStmt : public Stmt {
StringLiteral **Constraints;
Stmt **Exprs;
StringLiteral **Clobbers;
-
-protected:
- virtual void DoDestroy(ASTContext &Ctx);
public:
AsmStmt(ASTContext &C, SourceLocation asmloc, bool issimple, bool isvolatile,
OpenPOWER on IntegriCloud