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

Ted Kremenek kremenek at apple.com
Thu Oct 25 08:39:10 PDT 2007


Author: kremenek
Date: Thu Oct 25 10:39:09 2007
New Revision: 43342

URL: http://llvm.org/viewvc/llvm-project?rev=43342&view=rev
Log:
Added constness to accessors in CompoundStmt.

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=43342&r1=43341&r2=43342&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/Stmt.h (original)
+++ cfe/trunk/include/clang/AST/Stmt.h Thu Oct 25 10:39:09 2007
@@ -18,6 +18,7 @@
 #include "clang/AST/StmtIterator.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/ADT/iterator"
+#include "llvm/Bitcode/Serialization.h"
 #include <iosfwd>
 
 namespace clang {
@@ -217,8 +218,8 @@
     return SourceRange(LBracLoc, RBracLoc); 
   }
   
-  SourceLocation getLBracLoc() { return LBracLoc; }
-  SourceLocation getRBracLoc() { return RBracLoc; }
+  SourceLocation getLBracLoc() const { return LBracLoc; }
+  SourceLocation getRBracLoc() const { return RBracLoc; }
   
   static bool classof(const Stmt *T) { 
     return T->getStmtClass() == CompoundStmtClass; 
@@ -661,4 +662,17 @@
 
 }  // end namespace clang
 
+//===----------------------------------------------------------------------===//
+// For Stmt serialization.
+//===----------------------------------------------------------------------===//
+
+namespace llvm {
+  
+template<> struct SerializeTrait<clang::Stmt> {
+  static void Emit(Serializer& S, clang::Stmt& stmt);
+  static clang::Stmt* Materialize(Deserializer& D);
+};
+  
+} // end namespace llvm
+
 #endif





More information about the cfe-commits mailing list