[llvm] [DebugInfo] Avoid std::function in DWARF verifier internals (PR #202866)
Orlando Cazalet-Hyams via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 11 01:40:34 PDT 2026
================
@@ -41,11 +43,20 @@ struct AggregationData {
class OutputCategoryAggregator {
private:
+ friend class DWARFVerifier;
+
std::mutex WriteMutex;
std::map<std::string, AggregationData, std::less<>> Aggregation;
uint64_t NumErrors = 0;
bool IncludeDetail;
+ void report(StringRef category, function_ref<void()> detailCallback);
----------------
OCHyams wrote:
Seems slightly unusual to have "overloads" with different capitalisation style. I suppose we can't overload them without having to have extra disambiguation at the call sites which is unfortunate, and calling them xxxImpl makes them seem as though they shouldn't be called.
I feel changing the existing functions (`public` ones marked LLVM_ABI) instead of introducing new function makes more sense here, as I don't think we have any need to keep this particular API stable? I imagine that would cause essentially zero extra churn/noise within LLVM itself over this version.
If not, then it might be useful to have a comment explaining why/when to use/prefer one or the other.
https://github.com/llvm/llvm-project/pull/202866
More information about the llvm-commits
mailing list