From cc326204dd97771c336b9aab3b9963ea30d69c29 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Thu, 25 Oct 2007 15:39:09 +0000 Subject: [PATCH] Added constness to accessors in CompoundStmt. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43342 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/AST/Stmt.h | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/include/clang/AST/Stmt.h b/include/clang/AST/Stmt.h index a73bd2e56e..91a5429621 100644 --- a/include/clang/AST/Stmt.h +++ b/include/clang/AST/Stmt.h @@ -18,6 +18,7 @@ #include "clang/AST/StmtIterator.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/iterator" +#include "llvm/Bitcode/Serialization.h" #include 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 { + static void Emit(Serializer& S, clang::Stmt& stmt); + static clang::Stmt* Materialize(Deserializer& D); +}; + +} // end namespace llvm + #endif -- 2.40.0