aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-10-04 22:28:23 +0000
committerDevang Patel <dpatel@apple.com>2010-10-04 22:28:23 +0000
commit49c8465f14fc3b2e1a32c7016ad3fb4e2cf8d466 (patch)
treeaa6c0ccee698fb2ef89a29d070aec4f470364322 /lib/CodeGen
parent7fa8ab2e77f5703d0adf14e4d98f1edc1e66505d (diff)
dyn_cast is more appropriate here.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115569 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/CGExprScalar.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp
index c7176cc2ab..62433a1781 100644
--- a/lib/CodeGen/CGExprScalar.cpp
+++ b/lib/CodeGen/CGExprScalar.cpp
@@ -730,7 +730,7 @@ Value *ScalarExprEmitter::VisitMemberExpr(MemberExpr *E) {
if (DI && CGF.CGM.getCodeGenOpts().LimitDebugInfo) {
QualType PQTy = E->getBase()->IgnoreParenImpCasts()->getType();
if (const PointerType * PTy = dyn_cast<PointerType>(PQTy))
- if (FieldDecl *M = cast<FieldDecl>(E->getMemberDecl()))
+ if (FieldDecl *M = dyn_cast<FieldDecl>(E->getMemberDecl()))
DI->getOrCreateRecordType(PTy->getPointeeType(),
M->getParent()->getLocation());
}