aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Dyck <kd@kendyck.com>2011-02-20 01:55:18 +0000
committerKen Dyck <kd@kendyck.com>2011-02-20 01:55:18 +0000
commitbee5a79fc95e3003d755031e3d2bb4410a71e1c1 (patch)
tree7e9791a53b6eea3025c457c699d35512c0d77f88
parent26ed5f1b0df3e2bf7ec4715c2c3afd26408ff1b7 (diff)
Add const qualifier to getTypeInfoInChars().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126064 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/AST/ASTContext.h4
-rw-r--r--lib/AST/ASTContext.cpp4
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<CharUnits, CharUnits> getTypeInfoInChars(const Type *T);
- std::pair<CharUnits, CharUnits> getTypeInfoInChars(QualType T);
+ std::pair<CharUnits, CharUnits> getTypeInfoInChars(const Type *T) const;
+ std::pair<CharUnits, CharUnits> 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<CharUnits, CharUnits>
-ASTContext::getTypeInfoInChars(const Type *T) {
+ASTContext::getTypeInfoInChars(const Type *T) const {
std::pair<uint64_t, unsigned> Info = getTypeInfo(T);
return std::make_pair(toCharUnitsFromBits(Info.first),
toCharUnitsFromBits(Info.second));
}
std::pair<CharUnits, CharUnits>
-ASTContext::getTypeInfoInChars(QualType T) {
+ASTContext::getTypeInfoInChars(QualType T) const {
return getTypeInfoInChars(T.getTypePtr());
}