Skip to content

Commit 38782bd

Browse files
committed
Move enum idt to the single translation unit that actually requires it
1 parent e657da8 commit 38782bd

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/util/irep_ids.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@ const char *irep_ids_table[]=
2727

2828
#ifdef USE_DSTRING
2929

30+
enum class idt:unsigned
31+
{
32+
#define IREP_ID_ONE(the_id) id_##the_id,
33+
#define IREP_ID_TWO(the_id, str) id_##the_id,
34+
35+
#include "irep_ids.def" // NOLINT(build/include)
36+
};
37+
3038
#define IREP_ID_ONE(the_id) \
3139
const dstringt ID_##the_id=dstringt::make_from_table_index( \
3240
static_cast<unsigned>(idt::id_##the_id));

src/util/irep_ids.h

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,6 @@ Author: Reuben Thomas, [email protected]
3333
/// into a const extern irep_idt with the variable name `ID_param` and the
3434
/// string value `"contents"`.
3535

36-
enum class idt:unsigned
37-
{
38-
#define IREP_ID_ONE(the_id) id_##the_id,
39-
#define IREP_ID_TWO(the_id, str) id_##the_id,
40-
41-
#include "irep_ids.def"
42-
};
43-
4436
#ifdef USE_DSTRING
4537

4638
#define IREP_ID_ONE(the_id) extern const dstringt ID_##the_id;
@@ -53,6 +45,6 @@ enum class idt:unsigned
5345

5446
#endif
5547

56-
#include "irep_ids.def" // NOLINT(build/include)
48+
#include "irep_ids.def"
5749

5850
#endif

0 commit comments

Comments
 (0)