[PATCH] D17623: [compiler-rt] Fix entry count for __llvm_prf_data on i386 Darwin

David Li via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 25 16:56:23 PST 2016


davidxl added inline comments.

================
Comment at: lib/profile/InstrProfilingBuffer.c:31
@@ +30,3 @@
+  intptr_t SectionSize = EndI - BeginI;
+  intptr_t SizeOfLastEntry = SectionSize % sizeof(__llvm_profile_data);
+  if (!SizeOfLastEntry)
----------------
Probably just

EndI = (__llvm_profile_data *) ((intptr_t)End  + sizeof(__llvm_profile_data) -1);
return EndI - Begin;


http://reviews.llvm.org/D17623





More information about the llvm-commits mailing list