aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-11-21 09:05:59 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-11-21 09:05:59 +0000
commitc52365674b5b157a0486f75c12dd9f4cc41d8089 (patch)
tree27087bd38035e8ff93f2c7ae9a89f9d9216932b6
parent3c9e463762243affcb0223d853ba10e07e321747 (diff)
Add 1+2 consts.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89546 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/AST/DeclBase.h4
-rw-r--r--lib/AST/DeclBase.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/include/clang/AST/DeclBase.h b/include/clang/AST/DeclBase.h
index 79f7663561..e1f948fdd5 100644
--- a/include/clang/AST/DeclBase.h
+++ b/include/clang/AST/DeclBase.h
@@ -503,12 +503,12 @@ private:
/// PrettyStackTraceDecl - If a crash occurs, indicate that it happened when
/// doing something to a specific decl.
class PrettyStackTraceDecl : public llvm::PrettyStackTraceEntry {
- Decl *TheDecl;
+ const Decl *TheDecl;
SourceLocation Loc;
SourceManager &SM;
const char *Message;
public:
- PrettyStackTraceDecl(Decl *theDecl, SourceLocation L,
+ PrettyStackTraceDecl(const Decl *theDecl, SourceLocation L,
SourceManager &sm, const char *Msg)
: TheDecl(theDecl), Loc(L), SM(sm), Message(Msg) {}
diff --git a/lib/AST/DeclBase.cpp b/lib/AST/DeclBase.cpp
index 831f552489..f0eb011332 100644
--- a/lib/AST/DeclBase.cpp
+++ b/lib/AST/DeclBase.cpp
@@ -119,7 +119,7 @@ void PrettyStackTraceDecl::print(llvm::raw_ostream &OS) const {
OS << Message;
- if (NamedDecl *DN = dyn_cast_or_null<NamedDecl>(TheDecl))
+ if (const NamedDecl *DN = dyn_cast_or_null<NamedDecl>(TheDecl))
OS << " '" << DN->getQualifiedNameAsString() << '\'';
OS << '\n';
}