[PATCH] D28345: [XRay] Define the library for XRay trace logs

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 9 11:29:12 PST 2017


dblaikie accepted this revision.
dblaikie added inline comments.
This revision is now accepted and ready to land.


================
Comment at: include/llvm/XRay/LogReader.h:39
+///
 class LogReader {
   XRayFileHeader FileHeader;
----------------
Name seems slightly erroneous - rather than loading the log, this class seems to represent the log itself (you iterate over it as in the example, etc). Perhaps it should be called 'Log' instead? (or maybe there's a less ambiguous/likely colliding name) maybe with a named ctor (static function) called 'parse' instead of a ctor, for documentation?


================
Comment at: include/llvm/XRay/LogReader.h:53
+  /// record.
   LogReader(StringRef Filename, Error &Err, bool Sort, LoaderFunction Loader);
 
----------------
Can the LogLoader use file magic to detect how to parse the file rather than having the user specify a LoaderFunction?


https://reviews.llvm.org/D28345





More information about the llvm-commits mailing list