summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-07-24 18:05:58 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-07-24 18:05:58 +0000
commitac346ba5a118ff43347423e8b9760411443a31e8 (patch)
tree688050975a571de829240ab34b0f10d139713458 /clang/lib/CodeGen/CGDebugInfo.cpp
parentc7bf20403bee51789f3691f0bf9bc7d7216f3f28 (diff)
downloadbcm5719-llvm-ac346ba5a118ff43347423e8b9760411443a31e8.tar.gz
bcm5719-llvm-ac346ba5a118ff43347423e8b9760411443a31e8.zip
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
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp4
1 files changed, 2 insertions, 2 deletions
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<llvm::DIDerivedTypeBase>(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<llvm::DIDerivedType>(MI->second);
+ return MI->second;
}
// If the member wasn't found in the cache, lazily construct and add it to the
OpenPOWER on IntegriCloud