[PATCH] D35149: llvm-profdata: Reduce memory usage by using Error callback rather than member

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 9 06:14:46 PDT 2017


davidxl added a comment.

It feels weird that the error handling is the first parameter of the interfaces.  Also is it possible to provide a default error handling ?



================
Comment at: tools/llvm-profdata/llvm-profdata.cpp:164
+    WC->Writer.addRecord(
+        [&](Error E) {
+          if (Reported) {
----------------
creating a named lambda is more readable IMO.


https://reviews.llvm.org/D35149





More information about the llvm-commits mailing list