]> granicus.if.org Git - llvm/commitdiff
[Attributor][Fix] Ensure the attribute names are created properly
authorJohannes Doerfert <jdoerfert@anl.gov>
Wed, 4 Sep 2019 19:01:08 +0000 (19:01 +0000)
committerJohannes Doerfert <jdoerfert@anl.gov>
Wed, 4 Sep 2019 19:01:08 +0000 (19:01 +0000)
The names of the attributes were not always created properly which
caused problems with the yaml output.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370956 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/IPO/Attributor.cpp

index a95912122540885d199384695143dbdddb84b3da..04b9c5f8ceda8ceb55ec72d866a667839d8e724b 100644 (file)
@@ -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)                                       \
   {                                                                            \