diff options
author | Gabor Marton <gabor.marton@ericsson.com> | 2019-06-28 08:08:51 +0000 |
---|---|---|
committer | Gabor Marton <gabor.marton@ericsson.com> | 2019-06-28 08:08:51 +0000 |
commit | 44019e8c500fba0cece458d2e44700c967f247c9 (patch) | |
tree | 6798531f5f99fd894393928a7782857d66718607 | |
parent | 75e55592872521950262293d9c3a96d497b2c42e (diff) | |
download | clang-44019e8c500fba0cece458d2e44700c967f247c9.tar.gz |
[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
-rw-r--r-- | lib/CrossTU/CrossTranslationUnit.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
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."); |