From: Chris Lattner Date: Wed, 16 Jan 2008 19:16:00 +0000 (+0000) Subject: add accessors to switchstmt. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=20dabe8b8ff7ed6d2d0158fee43755a4bc7642c3;p=clang add accessors to switchstmt. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46082 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/Stmt.h b/include/clang/AST/Stmt.h index 7d4d38ea1b..d321c9715c 100644 --- a/include/clang/AST/Stmt.h +++ b/include/clang/AST/Stmt.h @@ -287,6 +287,11 @@ public: } const Stmt *getSubStmt() const { return SubExprs[SUBSTMT]; } + void setSubStmt(Stmt *S) { SubExprs[SUBSTMT] = S; } + void setLHS(Expr *Val) { SubExprs[LHS] = reinterpret_cast(Val); } + void setRHS(Expr *Val) { SubExprs[RHS] = reinterpret_cast(Val); } + + virtual SourceRange getSourceRange() const { return SourceRange(CaseLoc, SubExprs[SUBSTMT]->getLocEnd()); }