[cfe-commits] r126064 - in /cfe/trunk: include/clang/AST/ASTContext.h lib/AST/ASTContext.cpp

Ken Dyck kd at kendyck.com
Sat Feb 19 17:55:18 PST 2011


Author: kjdyck
Date: Sat Feb 19 19:55:18 2011
New Revision: 126064

URL: http://llvm.org/viewvc/llvm-project?rev=126064&view=rev
Log:
Add const qualifier to getTypeInfoInChars().

Modified:
    cfe/trunk/include/clang/AST/ASTContext.h
    cfe/trunk/lib/AST/ASTContext.cpp

Modified: cfe/trunk/include/clang/AST/ASTContext.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ASTContext.h?rev=126064&r1=126063&r2=126064&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/ASTContext.h (original)
+++ cfe/trunk/include/clang/AST/ASTContext.h Sat Feb 19 19:55:18 2011
@@ -1042,8 +1042,8 @@
   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

Modified: cfe/trunk/lib/AST/ASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTContext.cpp?rev=126064&r1=126063&r2=126064&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ASTContext.cpp (original)
+++ cfe/trunk/lib/AST/ASTContext.cpp Sat Feb 19 19:55:18 2011
@@ -652,14 +652,14 @@
 }
 
 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());
 }
 





More information about the cfe-commits mailing list