diff options
author | Chris Lattner <sabre@nondot.org> | 2008-01-16 19:16:00 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-01-16 19:16:00 +0000 |
commit | 45b985c664ac7cee9dc13c72f5fdebe999e978a0 (patch) | |
tree | 91e898520dfaa109d00b35bbfc3d0e32ff7cc35b | |
parent | 334139f58e3a4a2b784983284c52196c2d55867a (diff) | |
download | llvm-45b985c664ac7cee9dc13c72f5fdebe999e978a0.tar.gz |
add accessors to switchstmt.
llvm-svn: 46082
-rw-r--r-- | clang/include/clang/AST/Stmt.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/include/clang/AST/Stmt.h b/clang/include/clang/AST/Stmt.h index 7d4d38ea1be1..d321c9715c7f 100644 --- a/clang/include/clang/AST/Stmt.h +++ b/clang/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<Stmt*>(Val); } + void setRHS(Expr *Val) { SubExprs[RHS] = reinterpret_cast<Stmt*>(Val); } + + virtual SourceRange getSourceRange() const { return SourceRange(CaseLoc, SubExprs[SUBSTMT]->getLocEnd()); } |