Skip to content

Commit

Permalink
[CTU] Add missing statistics
Browse files Browse the repository at this point in the history
Reviewers: xazax.hun

Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D63878

llvm-svn: 364630
  • Loading branch information
Gabor Marton committed Jun 28, 2019
1 parent 62889b0 commit 8ab8a60
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions clang/lib/CrossTU/CrossTranslationUnit.cpp
Expand Up @@ -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");
Expand Down Expand Up @@ -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.");
Expand Down

0 comments on commit 8ab8a60

Please sign in to comment.