================
@@ -275,18 +282,28 @@ lprofWriteDataImpl(ProfDataWriter *Writer, const 
__llvm_profile_data *DataBegin,
   const uint64_t NumBitmapBytes =
       __llvm_profile_get_num_bitmap_bytes(BitmapBegin, BitmapEnd);
   const uint64_t NamesSize = __llvm_profile_get_name_size(NamesBegin, 
NamesEnd);
+  const uint64_t NumVTables =
+      __llvm_profile_get_num_vtable(VTableBegin, VTableEnd);
+  const uint64_t VTableSectionSize =
+      __llvm_profile_get_vtable_section_size(VTableBegin, VTableEnd);
+  // Value profiling is not supported when DebugInfoCorrelate is true.
----------------
minglotus-6 wrote:

This comment is likely cause more confusion than clearing them. I deleted it.

In the initial commit, the code and comment are like this

```
  // Note, in reality, vtable profiling is not supported when DebugInfoCorrelate
  // is true.
  const uint64_t VNamesSize = DebugInfoCorrelate ? 0 : VNamesEnd - VNamesBegin;
```
By then, the comment explains the reason (i.e., value profiling won't happen in 
the first place when `DebugInfoCorrelate` is true according to [this 
comment](https://github.com/llvm/llvm-project/blob/72552fc5cbc0cf2f44508948a075d14f0d5aa2b3/compiler-rt/lib/profile/InstrProfilingWriter.c#L334-L335))
 to set `VNamesSize` to `0` when `DebugInfoCorrelate` is true. 

Now 
[__llvm_profile_get_name_size](https://github.com/llvm/llvm-project/blob/72552fc5cbc0cf2f44508948a075d14f0d5aa2b3/compiler-rt/lib/profile/InstrProfilingBuffer.c#L100-L104)
 handles the conditional zero so deleted the comment.


https://github.com/llvm/llvm-project/pull/66825
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to