[PATCH] D19168: [esan] EfficiencySanitizer base runtime library

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 15 15:17:06 PDT 2016


vitalybuka added inline comments.

================
Comment at: lib/esan/esan.cc:54
@@ +53,3 @@
+ALWAYS_INLINE USED
+void processMemAccess(uptr PC, uptr Addr, int SizeLog, bool IsWrite) {
+  VPrintf(4, "in esan::%s %p: %c %p %d\n", __FUNCTION__, PC,
----------------
This looks inconsistent with functions below.
why it's SizeLog, not just Size and round up to the power of 2 here?

================
Comment at: lib/esan/esan.h:41
@@ +40,3 @@
+const int kSizeLog1 = 0;
+const int kSizeLog2 = 1;
+const int kSizeLog4 = 2;
----------------
I am new to this code, so is there a convention for this?
Why not enum or even: constexpr sizeLog(size_t size) {...}


http://reviews.llvm.org/D19168





More information about the llvm-commits mailing list