Skip to content

Commit a7a3b3a

Browse files
author
Johannes Doerfert
committed
[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
1 parent b276a9a commit a7a3b3a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

llvm/lib/Transforms/IPO/Attributor.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ STATISTIC(NumAttributesManifested,
6969
#define BUILD_STAT_MSG_IR_ATTR(TYPE, NAME) \
7070
("Number of " #TYPE " marked '" #NAME "'")
7171
#define BUILD_STAT_NAME(NAME, TYPE) NumIR##TYPE##_##NAME
72-
#define STATS_DECL(NAME, TYPE, MSG) STATISTIC(BUILD_STAT_NAME(NAME, TYPE), MSG);
72+
#define STATS_DECL_(NAME, MSG) STATISTIC(NAME, MSG);
73+
#define STATS_DECL(NAME, TYPE, MSG) \
74+
STATS_DECL_(BUILD_STAT_NAME(NAME, TYPE), MSG);
7375
#define STATS_TRACK(NAME, TYPE) ++(BUILD_STAT_NAME(NAME, TYPE));
7476
#define STATS_DECLTRACK(NAME, TYPE, MSG) \
7577
{ \

0 commit comments

Comments
 (0)