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 | 4ba2a17694148e16eaa8d3917f657ffcd3667be4 (patch) | |
tree | eea2b0e8b20ab2099277ffc51940a4648d4447ca /lib/AST/StmtProfile.cpp | |
parent | de9d5c39a412611651d77cb41afd41e7849e0f67 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123314 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/StmtProfile.cpp')
-rw-r--r-- | lib/AST/StmtProfile.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/AST/StmtProfile.cpp b/lib/AST/StmtProfile.cpp index 63c3197ebc..232f48e1ee 100644 --- a/lib/AST/StmtProfile.cpp +++ b/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); |