[PATCH] D63878: [CTU] Add missing statistics

Gabor Marton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 28 01:09:05 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL364630: [CTU] Add missing statistics (authored by martong, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D63878?vs=206857&id=207011#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63878/new/

https://reviews.llvm.org/D63878

Files:
  cfe/trunk/lib/CrossTU/CrossTranslationUnit.cpp


Index: cfe/trunk/lib/CrossTU/CrossTranslationUnit.cpp
===================================================================
--- cfe/trunk/lib/CrossTU/CrossTranslationUnit.cpp
+++ cfe/trunk/lib/CrossTU/CrossTranslationUnit.cpp
@@ -40,6 +40,10 @@
 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 @@
                     [&](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.");


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63878.207011.patch
Type: text/x-patch
Size: 1480 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190628/d3407d1b/attachment.bin>


More information about the llvm-commits mailing list