From bee5a79fc95e3003d755031e3d2bb4410a71e1c1 Mon Sep 17 00:00:00 2001 From: Ken Dyck Date: Sun, 20 Feb 2011 01:55:18 +0000 Subject: [PATCH] Add const qualifier to getTypeInfoInChars(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126064 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/AST/ASTContext.h | 4 ++-- lib/AST/ASTContext.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/clang/AST/ASTContext.h b/include/clang/AST/ASTContext.h index 7d2bd14ea9..1ddeaf1c46 100644 --- a/include/clang/AST/ASTContext.h +++ b/include/clang/AST/ASTContext.h @@ -1042,8 +1042,8 @@ public: CharUnits getTypeAlignInChars(QualType T) const; CharUnits getTypeAlignInChars(const Type *T) const; - std::pair getTypeInfoInChars(const Type *T); - std::pair getTypeInfoInChars(QualType T); + std::pair getTypeInfoInChars(const Type *T) const; + std::pair getTypeInfoInChars(QualType T) const; /// getPreferredTypeAlign - Return the "preferred" alignment of the specified /// type for the current target in bits. This can be different than the ABI diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index 7da2f34843..50c295f241 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -652,14 +652,14 @@ CharUnits ASTContext::getDeclAlign(const Decl *D, bool RefAsPointee) const { } std::pair -ASTContext::getTypeInfoInChars(const Type *T) { +ASTContext::getTypeInfoInChars(const Type *T) const { std::pair Info = getTypeInfo(T); return std::make_pair(toCharUnitsFromBits(Info.first), toCharUnitsFromBits(Info.second)); } std::pair -ASTContext::getTypeInfoInChars(QualType T) { +ASTContext::getTypeInfoInChars(QualType T) const { return getTypeInfoInChars(T.getTypePtr()); } -- 2.40.0