[cfe-commits] r46082 - /cfe/trunk/include/clang/AST/Stmt.h

Chris Lattner sabre at nondot.org
Wed Jan 16 11:16:03 PST 2008


Author: lattner
Date: Wed Jan 16 13:16:00 2008
New Revision: 46082

URL: http://llvm.org/viewvc/llvm-project?rev=46082&view=rev
Log:
add accessors to switchstmt.

Modified:
    cfe/trunk/include/clang/AST/Stmt.h

Modified: cfe/trunk/include/clang/AST/Stmt.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Stmt.h?rev=46082&r1=46081&r2=46082&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/Stmt.h (original)
+++ cfe/trunk/include/clang/AST/Stmt.h Wed Jan 16 13:16:00 2008
@@ -287,6 +287,11 @@
   }
   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()); 
   }





More information about the cfe-commits mailing list