From ac346ba5a118ff43347423e8b9760411443a31e8 Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Fri, 24 Jul 2015 18:05:58 +0000 Subject: DI: Make StaticDataMemberCache type-safe, NFC Change `StaticDataMemberCache` to store references to `DIDerivedType` directly, and remove now-unnecessary casts from the accessors. llvm-svn: 243129 --- clang/lib/CodeGen/CGDebugInfo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp') diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 93a2287b1e0..9d115e3c0c7 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -972,7 +972,7 @@ void CGDebugInfo::CollectRecordFields( if (MI != StaticDataMemberCache.end()) { assert(MI->second && "Static data member declaration should still exist"); - elements.push_back(cast(MI->second)); + elements.push_back(MI->second); } else { auto Field = CreateRecordStaticField(V, RecordTy, record); elements.push_back(Field); @@ -3115,7 +3115,7 @@ CGDebugInfo::getOrCreateStaticDataMemberDeclarationOrNull(const VarDecl *D) { auto MI = StaticDataMemberCache.find(D->getCanonicalDecl()); if (MI != StaticDataMemberCache.end()) { assert(MI->second && "Static data member declaration should still exist"); - return cast(MI->second); + return MI->second; } // If the member wasn't found in the cache, lazily construct and add it to the -- cgit v1.2.3