The implementation of the buffer API and File API share almost identical code causing lots of duplicate update work. This patch refactors the implementation using a writer callback mechanism.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Thanks, just a few nits --
lib/profile/InstrProfilingBuffer.c | ||
---|---|---|
44 ↗ | (On Diff #40249) | ElmS -> ElmSize? |
44 ↗ | (On Diff #40249) | C code in compiler-rt looks like it uses all lowercase and "_" separators in function names. We should preserve that style. |
lib/profile/InstrProfilingFile.c | ||
20 ↗ | (On Diff #40249) | Same ElmS nit |
lib/profile/InstrProfilingWriter.c | ||
57 ↗ | (On Diff #40249) | CHECK_fwrite -> CHECK_write |
lib/profile/InstrProfilingBuffer.c | ||
---|---|---|
44 ↗ | (On Diff #40249) | yes public C APIs are all lower cases, but these two new functions are internal APIs (just like existing functions like writeFile etc). They have global linkage mainly because the cross module references. |