diff options
| author | Ken Dyck <kd@kendyck.com> | 2011-02-20 01:55:18 +0000 |
|---|---|---|
| committer | Ken Dyck <kd@kendyck.com> | 2011-02-20 01:55:18 +0000 |
| commit | d24099de04ed5e8a48b1c45132cb06046eadc610 (patch) | |
| tree | 0f986c6d382a22e9c78e3c317df1ab1030766926 | |
| parent | 1daeacbda8d74350750811e3661ad10cb72e3c9b (diff) | |
| download | bcm5719-llvm-d24099de04ed5e8a48b1c45132cb06046eadc610.tar.gz bcm5719-llvm-d24099de04ed5e8a48b1c45132cb06046eadc610.zip | |
Add const qualifier to getTypeInfoInChars().
llvm-svn: 126064
| -rw-r--r-- | clang/include/clang/AST/ASTContext.h | 4 | ||||
| -rw-r--r-- | clang/lib/AST/ASTContext.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/clang/include/clang/AST/ASTContext.h b/clang/include/clang/AST/ASTContext.h index 7d2bd14ea94..1ddeaf1c46b 100644 --- a/clang/include/clang/AST/ASTContext.h +++ b/clang/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/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index 7da2f348439..50c295f241f 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/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()); } |

