From: Johannes Doerfert Date: Tue, 20 Aug 2019 06:09:56 +0000 (+0000) Subject: [Attributor][NFC] Cleanup statistics code X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=08efae3b0a15266ddf894ba0c21934044b626298;p=llvm [Attributor][NFC] Cleanup statistics code git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369330 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/IPO/Attributor.cpp b/lib/Transforms/IPO/Attributor.cpp index 984501f06a9..1ae658dbd4f 100644 --- a/lib/Transforms/IPO/Attributor.cpp +++ b/lib/Transforms/IPO/Attributor.cpp @@ -73,8 +73,10 @@ STATISTIC(NumAttributesManifested, #define STATS_DECL(NAME, TYPE, MSG) STATISTIC(BUILD_STAT_NAME(NAME, TYPE), MSG); #define STATS_TRACK(NAME, TYPE) ++(BUILD_STAT_NAME(NAME, TYPE)); #define STATS_DECLTRACK(NAME, TYPE, MSG) \ - STATS_DECL(NAME, TYPE, MSG) \ - STATS_TRACK(NAME, TYPE) + { \ + STATS_DECL(NAME, TYPE, MSG) \ + STATS_TRACK(NAME, TYPE) \ + } #define STATS_DECLTRACK_ARG_ATTR(NAME) \ STATS_DECLTRACK(NAME, Arguments, BUILD_STAT_MSG_IR_ATTR(arguments, NAME)) #define STATS_DECLTRACK_CSARG_ATTR(NAME) \ @@ -2099,7 +2101,8 @@ struct AADereferenceableArgument final /// See AbstractAttribute::trackStatistics() void trackStatistics() const override{ - STATS_DECLTRACK_ARG_ATTR(dereferenceable)}; + STATS_DECLTRACK_ARG_ATTR(dereferenceable) + } }; /// Dereferenceable attribute for a call site argument. @@ -2208,7 +2211,7 @@ struct AAAlignArgument final : AAArgumentFromCallSiteArguments { : AAArgumentFromCallSiteArguments(IRP) {} /// See AbstractAttribute::trackStatistics() - void trackStatistics() const override{STATS_DECLTRACK_ARG_ATTR(aligned)}; + void trackStatistics() const override { STATS_DECLTRACK_ARG_ATTR(aligned) } }; struct AAAlignCallSiteArgument final : AAAlignFloating {