From: Adrian Prantl Date: Mon, 22 Aug 2016 22:38:16 +0000 (+0000) Subject: Add comments. NFC X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e8abf261c4b533e3f07cf2fc64590dcdd4d8cb6f;p=clang Add comments. NFC git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279490 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index af0cd02ed2..d515e1a31f 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -1650,8 +1650,10 @@ static bool hasExplicitMemberDefinition(CXXRecordDecl::method_iterator I, /// Does a type definition exist in an imported clang module? static bool isDefinedInClangModule(const RecordDecl *RD) { + // Only definitions that where imported from an AST file come from a module. if (!RD || !RD->isFromASTFile()) return false; + // Anonymous entities cannot be addressed. Treat them as not from module. if (!RD->isExternallyVisible() && RD->getName().empty()) return false; if (auto *CXXDecl = dyn_cast(RD)) {