constify some stuff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41503 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/AST/ASTContext.cpp b/AST/ASTContext.cpp
index 1a740b5..bc73748 100644
--- a/AST/ASTContext.cpp
+++ b/AST/ASTContext.cpp
@@ -314,8 +314,8 @@
/// getEnumDeclIntegerType - returns the integer type compatible with the
/// given enum type.
-QualType ASTContext::getEnumDeclIntegerType(EnumDecl *ED) const {
- if (EnumConstantDecl *C = ED->getEnumConstantList())
+QualType ASTContext::getEnumDeclIntegerType(const EnumDecl *ED) const {
+ if (const EnumConstantDecl *C = ED->getEnumConstantList())
return C->getType();
// If the enum list is empty, it is typed as if it contained a single zero
diff --git a/include/clang/AST/ASTContext.h b/include/clang/AST/ASTContext.h
index 8973087..47a433d 100644
--- a/include/clang/AST/ASTContext.h
+++ b/include/clang/AST/ASTContext.h
@@ -149,7 +149,7 @@
/// getEnumDeclIntegerType - returns the integer type compatible with the
/// given enum type.
- QualType getEnumDeclIntegerType(EnumDecl *ED) const;
+ QualType getEnumDeclIntegerType(const EnumDecl *ED) const;
//===--------------------------------------------------------------------===//
// Type Operators