diff options
| author | Mike Stump <mrs@apple.com> | 2009-08-07 18:05:12 +0000 |
|---|---|---|
| committer | Mike Stump <mrs@apple.com> | 2009-08-07 18:05:12 +0000 |
| commit | e607ed068334bacb8d7b093996b4671c6ca79e25 (patch) | |
| tree | bd6c53391ec6c669eeef50714b44ec9d044c37d2 /lib/CodeGen/CodeGenTypes.cpp | |
| parent | d0439688fea4dedc28125d246bbdec1f5a208660 (diff) | |
| download | clang-e607ed068334bacb8d7b093996b4671c6ca79e25.tar.gz clang-e607ed068334bacb8d7b093996b4671c6ca79e25.tar.bz2 clang-e607ed068334bacb8d7b093996b4671c6ca79e25.tar.xz | |
Fix some const_cast issues. This is the beginning of the rabbit hole.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78393 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenTypes.cpp')
| -rw-r--r-- | lib/CodeGen/CodeGenTypes.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/CodeGen/CodeGenTypes.cpp b/lib/CodeGen/CodeGenTypes.cpp index 0cb0c72f2e..7b1b85c64c 100644 --- a/lib/CodeGen/CodeGenTypes.cpp +++ b/lib/CodeGen/CodeGenTypes.cpp @@ -121,8 +121,7 @@ static const TagType *VerifyFuncTypeComplete(const Type* T) { /// UpdateCompletedType - When we find the full definition for a TagDecl, /// replace the 'opaque' type we previously made for it if applicable. void CodeGenTypes::UpdateCompletedType(const TagDecl *TD) { - const Type *Key = - Context.getTagDeclType(const_cast<TagDecl*>(TD)).getTypePtr(); + const Type *Key = Context.getTagDeclType(TD).getTypePtr(); llvm::DenseMap<const Type*, llvm::PATypeHolder>::iterator TDTI = TagDeclTypes.find(Key); if (TDTI == TagDeclTypes.end()) return; @@ -395,7 +394,7 @@ const llvm::Type *CodeGenTypes::ConvertTagDeclType(const TagDecl *TD) { // TagDecl's are not necessarily unique, instead use the (clang) // type connected to the decl. const Type *Key = - Context.getTagDeclType(const_cast<TagDecl*>(TD)).getTypePtr(); + Context.getTagDeclType(TD).getTypePtr(); llvm::DenseMap<const Type*, llvm::PATypeHolder>::iterator TDTI = TagDeclTypes.find(Key); @@ -478,7 +477,7 @@ void CodeGenTypes::addBitFieldInfo(const FieldDecl *FD, unsigned FieldNo, const CGRecordLayout * CodeGenTypes::getCGRecordLayout(const TagDecl *TD) const { const Type *Key = - Context.getTagDeclType(const_cast<TagDecl*>(TD)).getTypePtr(); + Context.getTagDeclType(TD).getTypePtr(); llvm::DenseMap<const Type*, CGRecordLayout *>::iterator I = CGRecordLayouts.find(Key); assert (I != CGRecordLayouts.end() |
