]> granicus.if.org Git - clang/commitdiff
add accessors to switchstmt.
authorChris Lattner <sabre@nondot.org>
Wed, 16 Jan 2008 19:16:00 +0000 (19:16 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 16 Jan 2008 19:16:00 +0000 (19:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46082 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/Stmt.h

index 7d4d38ea1be140f469dbd2701326f3a9df4af1f0..d321c9715c7f7307f96becfab713ff41233bb4eb 100644 (file)
@@ -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()); 
   }