From: Gabor Marton Date: Fri, 28 Jun 2019 08:08:51 +0000 (+0000) Subject: [CTU] Add missing statistics X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=44019e8c500fba0cece458d2e44700c967f247c9;p=clang [CTU] Add missing statistics Reviewers: xazax.hun Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63878 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@364630 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CrossTU/CrossTranslationUnit.cpp b/lib/CrossTU/CrossTranslationUnit.cpp index f504082ad3..a532189969 100644 --- a/lib/CrossTU/CrossTranslationUnit.cpp +++ b/lib/CrossTU/CrossTranslationUnit.cpp @@ -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::importDefinitionImpl(const T *D) { [&](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.");