Awesome! A couple of comments inline.

================
Comment at: include/clang/ASTMatchers/ASTMatchFinder.h:123
@@ +122,3 @@
+      /// \brief Output for the report. If null, it prints to llvm::errs()
+      std::unique_ptr<llvm::raw_ostream> OS;
+    };
----------------
I'd prefer a more structured interface, e.g. a map from string to some struct 
containing collected timings + a method to convert this map to string or print 
it to a stream. Not sure if this fits well with LLVM timing facilities you use, 
though.

================
Comment at: lib/ASTMatchers/ASTMatchFinder.cpp:315
@@ -300,1 +314,3 @@
+      llvm::TimeRegion Timer(
+          EnableCheckProfiling ? getTimerForBucket(MC->getID()) : nullptr);
       MC->onStartOfTranslationUnit();
----------------
You can check EnableCheckProfiling inside getTimerForBucket to reduce code 
repetition.

http://reviews.llvm.org/D5911



_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to