]> granicus.if.org Git - clang/commitdiff
Added constness to accessors in CompoundStmt.
authorTed Kremenek <kremenek@apple.com>
Thu, 25 Oct 2007 15:39:09 +0000 (15:39 +0000)
committerTed Kremenek <kremenek@apple.com>
Thu, 25 Oct 2007 15:39:09 +0000 (15:39 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43342 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/Stmt.h

index a73bd2e56eaad6ef2eed117c6d67c20cc7a37cd6..91a5429621c9d542e91031acefe49032d47879a5 100644 (file)
@@ -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 @@ public:
     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 @@ public:
 
 }  // 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