Author: martong Date: Fri Jun 28 01:08:51 2019 New Revision: 364630 URL: http://llvm.org/viewvc/llvm-project?rev=364630&view=rev Log: [CTU] Add missing statistics
Reviewers: xazax.hun Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63878 Modified: cfe/trunk/lib/CrossTU/CrossTranslationUnit.cpp Modified: cfe/trunk/lib/CrossTU/CrossTranslationUnit.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CrossTU/CrossTranslationUnit.cpp?rev=364630&r1=364629&r2=364630&view=diff ============================================================================== --- cfe/trunk/lib/CrossTU/CrossTranslationUnit.cpp (original) +++ cfe/trunk/lib/CrossTU/CrossTranslationUnit.cpp Fri Jun 28 01:08:51 2019 @@ -40,6 +40,10 @@ STATISTIC( STATISTIC(NumGetCTUSuccess, "The # of getCTUDefinition successfully returned the " "requested function's body"); +STATISTIC(NumUnsupportedNodeFound, "The # of imports when the ASTImporter " + "encountered an unsupported AST Node"); +STATISTIC(NumNameConflicts, "The # of imports when the ASTImporter " + "encountered an ODR error"); STATISTIC(NumTripleMismatch, "The # of triple mismatches"); STATISTIC(NumLangMismatch, "The # of language mismatches"); STATISTIC(NumLangDialectMismatch, "The # of language dialect mismatches"); @@ -404,10 +408,10 @@ CrossTranslationUnitContext::importDefin [&](const ImportError &IE) { switch (IE.Error) { case ImportError::NameConflict: - // FIXME: Add statistic. + ++NumNameConflicts; break; case ImportError::UnsupportedConstruct: - // FIXME: Add statistic. + ++NumUnsupportedNodeFound; break; case ImportError::Unknown: llvm_unreachable("Unknown import error happened."); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits