From 9319be4cee9f010d50adb161b2688e526ee1e3b0 Mon Sep 17 00:00:00 2001 From: Johannes Doerfert Date: Wed, 4 Sep 2019 19:01:08 +0000 Subject: [PATCH] [Attributor][Fix] Ensure the attribute names are created properly The names of the attributes were not always created properly which caused problems with the yaml output. llvm-svn: 370956 --- lib/Transforms/IPO/Attributor.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Transforms/IPO/Attributor.cpp b/lib/Transforms/IPO/Attributor.cpp index a9591212254..04b9c5f8ced 100644 --- a/lib/Transforms/IPO/Attributor.cpp +++ b/lib/Transforms/IPO/Attributor.cpp @@ -69,7 +69,9 @@ STATISTIC(NumAttributesManifested, #define BUILD_STAT_MSG_IR_ATTR(TYPE, NAME) \ ("Number of " #TYPE " marked '" #NAME "'") #define BUILD_STAT_NAME(NAME, TYPE) NumIR##TYPE##_##NAME -#define STATS_DECL(NAME, TYPE, MSG) STATISTIC(BUILD_STAT_NAME(NAME, TYPE), MSG); +#define STATS_DECL_(NAME, MSG) STATISTIC(NAME, MSG); +#define STATS_DECL(NAME, TYPE, MSG) \ + STATS_DECL_(BUILD_STAT_NAME(NAME, TYPE), MSG); #define STATS_TRACK(NAME, TYPE) ++(BUILD_STAT_NAME(NAME, TYPE)); #define STATS_DECLTRACK(NAME, TYPE, MSG) \ { \