[PATCH] D20590: [esan|cfrag] Add struct infomation printing for the cfrag tool.

Filipe Cabecinhas via llvm-commits llvm-commits at lists.llvm.org
Wed May 25 09:36:39 PDT 2016

filcab added a subscriber: filcab.
filcab added a comment.

LGTM, with the fixes.

Comment at: lib/esan/cache_frag.cpp:23
@@ +22,3 @@
+// This should be kept consistent with LLVM's EfficiencySanitizer StructInfoTy.
+struct StructInfoTy {
+  const char *StructName;
No need to have `Ty` in the name.

Comment at: lib/esan/cache_frag.cpp:25
@@ +24,3 @@
+  const char *StructName;
+  u32 NumOfFields;
+  u64 *Counters;
Maybe put the `u32` at the end?
It'll end up being the same wasted space, but it might be easier to extend and keep binary compatibility, if we want (unsure we'd want that, though).

Comment at: lib/esan/cache_frag.cpp:38
@@ -25,1 +37,3 @@
+static void printStructInfo(CacheFragTy *CacheFrag) {
+  // We print StructInfo for debugging purpose.
aizatsky wrote:
> Not sure about this, but maybe add "print" member methods to structs?


More information about the llvm-commits mailing list