[PATCH] D51289: [XRay] FDR Record Producer/Consumer Implementation

Eizan Miyamoto via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 30 22:52:43 PDT 2018


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


================
Comment at: llvm/lib/XRay/FDRRecordProducer.cpp:31
+  // For metadata records, handle especially here.
+  if (FirstByte & 0x01) {
+    // FIXME: Use a registry, and dispatch based on record types more
----------------
nit: Instead of doing the bitwise ops directly here and in the switch statement argument + elsewhere, why not declare something like bool is_metadata(uint8_t b) and enum MetadataType metadata_type(uint8t_t d). That way you don't need somebody to refer to your comment at the top of this function, and if you use enum values you don't need to annotate each 'case N:' line.


https://reviews.llvm.org/D51289





More information about the llvm-commits mailing list