From 09906a6e87eb256f6cc8e0a37bddbb094ebea30e Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Mon, 22 Aug 2016 22:38:16 +0000 Subject: Add comments. NFC llvm-svn: 279490 --- clang/lib/CodeGen/CGDebugInfo.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp') diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index af0cd02ed2f..d515e1a31f7 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/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)) { -- cgit v1.2.3