[PATCH] D20661: [esan|cfrag] Create the cfrag struct array for the runtime

Derek Bruening via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 1 19:49:28 PDT 2016


bruening accepted this revision.
This revision is now accepted and ready to land.

================
Comment at: lib/Transforms/Instrumentation/EfficiencySanitizer.cpp:249
@@ +248,3 @@
+  // field type id.
+  // Append #NumOfFields
+  NameStr += "#";
----------------
nit: . or : at end

================
Comment at: lib/Transforms/Instrumentation/EfficiencySanitizer.cpp:305
@@ +304,3 @@
+    }
+    ++NumOfStructs;
+
----------------
nit: NumIgnoredStructs vs NumOfStructs: maybe remove the Of for consistency ("NumOf" sounds weird to me btw: "NumberOfX" or "NumX" seem more natural, though I see "NumOf" in other LLVM source files.)

================
Comment at: lib/Transforms/Instrumentation/EfficiencySanitizer.cpp:325
@@ +324,3 @@
+    // Field type name array.
+    // We pass field type names to runtime for better user report.
+    auto *TypeNameArrayTy = ArrayType::get(Int8PtrTy, StructTy->getNumElements());
----------------
nit: 2 grammar issues

================
Comment at: lib/Transforms/Instrumentation/EfficiencySanitizer.cpp:352
@@ +351,3 @@
+  }
+  // Structs: StructInfo array
+  Constant *StructInfo;
----------------
nit: inconsistent: others have .


http://reviews.llvm.org/D20661





More information about the llvm-commits mailing list