diff options
author | Jay Foad <jay.foad@gmail.com> | 2011-01-12 09:06:06 +0000 |
---|---|---|
committer | Jay Foad <jay.foad@gmail.com> | 2011-01-12 09:06:06 +0000 |
commit | 39c7980772fd980ff06384453d0df1c25ed4fe7e (patch) | |
tree | 03b3de9c2e0547301263cf88e9a498c7bbb68ddc /clang/lib/AST/StmtProfile.cpp | |
parent | ebbeb792345cf5ef490f2a8d75d1e271082ef457 (diff) | |
download | bcm5719-llvm-39c7980772fd980ff06384453d0df1c25ed4fe7e.tar.gz bcm5719-llvm-39c7980772fd980ff06384453d0df1c25ed4fe7e.zip |
PR3558: mark "logically const" accessor methods in ASTContext as const,
and mark the fields they use as mutable. This allows us to remove a few
const_casts.
llvm-svn: 123314
Diffstat (limited to 'clang/lib/AST/StmtProfile.cpp')
-rw-r--r-- | clang/lib/AST/StmtProfile.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/AST/StmtProfile.cpp b/clang/lib/AST/StmtProfile.cpp index 63c3197ebce..232f48e1eee 100644 --- a/clang/lib/AST/StmtProfile.cpp +++ b/clang/lib/AST/StmtProfile.cpp @@ -25,11 +25,11 @@ using namespace clang; namespace { class StmtProfiler : public StmtVisitor<StmtProfiler> { llvm::FoldingSetNodeID &ID; - ASTContext &Context; + const ASTContext &Context; bool Canonical; public: - StmtProfiler(llvm::FoldingSetNodeID &ID, ASTContext &Context, + StmtProfiler(llvm::FoldingSetNodeID &ID, const ASTContext &Context, bool Canonical) : ID(ID), Context(Context), Canonical(Canonical) { } @@ -997,7 +997,7 @@ void StmtProfiler::VisitTemplateArgument(const TemplateArgument &Arg) { } } -void Stmt::Profile(llvm::FoldingSetNodeID &ID, ASTContext &Context, +void Stmt::Profile(llvm::FoldingSetNodeID &ID, const ASTContext &Context, bool Canonical) { StmtProfiler Profiler(ID, Context, Canonical); Profiler.Visit(this); |