summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index 153f285d493..09202bbbb83 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -1122,17 +1122,14 @@ CollectCXXMemberFunctions(const CXXRecordDecl *RD, llvm::DIFile Unit,
// the functions.
for(DeclContext::decl_iterator I = RD->decls_begin(),
E = RD->decls_end(); I != E; ++I) {
- Decl *D = *I;
- if (D->isImplicit())
- continue;
-
- if (const CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(D)) {
+ if (const CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(*I)) {
// Reuse the existing member function declaration if it exists
llvm::DenseMap<const FunctionDecl *, llvm::WeakVH>::iterator MI =
SPCache.find(Method->getCanonicalDecl());
- if (MI == SPCache.end())
- EltTys.push_back(CreateCXXMemberFunction(Method, Unit, RecordTy));
- else
+ if (MI == SPCache.end()) {
+ if (!Method->isImplicit())
+ EltTys.push_back(CreateCXXMemberFunction(Method, Unit, RecordTy));
+ } else
EltTys.push_back(MI->second);
}
}
OpenPOWER on IntegriCloud