On Fri, Sep 11, 2015 at 11:54 AM, Adrian Prantl via cfe-commits < cfe-commits@lists.llvm.org> wrote:
> Author: adrian > Date: Fri Sep 11 13:54:28 2015 > New Revision: 247447 > > URL: http://llvm.org/viewvc/llvm-project?rev=247447&view=rev > Log: > Remove a redundant check from CGDebugInfo::shouldOmitDefinition() (NFC). > > Modified: > cfe/trunk/lib/CodeGen/CGDebugInfo.cpp > > Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=247447&r1=247446&r2=247447&view=diff > > ============================================================================== > --- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original) > +++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Fri Sep 11 13:54:28 2015 > @@ -1480,14 +1480,8 @@ static bool shouldOmitDefinition(CodeGen > const RecordDecl *RD, > const LangOptions &LangOpts) { > // Does the type exist in an imported clang module? > - if (DebugTypeExtRefs && RD->isFromASTFile()) { > - if (auto *CTSD = dyn_cast<ClassTemplateSpecializationDecl>(RD)) > - if (CTSD->isExplicitInstantiationOrSpecialization()) > - // We may not assume that this type made it into the module. > - return true; > - if (RD->getDefinition()) > + if (DebugTypeExtRefs && RD->isFromASTFile() && RD->getDefinition()) > Oh - and do we need to check for "getDefinition" here? Since this function is itself (by name/use) already about whether definitions should be omitted? I'm not sure, maybe it still makes sense... > return true; > - } > > if (DebugKind > CodeGenOptions::LimitedDebugInfo) > return false; > > > _______________________________________________ > cfe-commits mailing list > cfe-commits@lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits >
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits