Skip to content

Commit 9ed73d7

Browse files
committed
[PR] david - default values directly
1 parent 77ca9d8 commit 9ed73d7

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

compiler-rt/lib/rtsan/rtsan_flags.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,6 @@ static void RegisterRtsanFlags(FlagParser *parser, Flags *f) {
3030
#undef RTSAN_FLAG
3131
}
3232

33-
void Flags::SetDefaults() {
34-
#define RTSAN_FLAG(Type, Name, DefaultValue, Description) Name = DefaultValue;
35-
#include "rtsan_flags.inc"
36-
#undef RTSAN_FLAG
37-
}
38-
3933
void __rtsan::InitializeFlags() {
4034
SetCommonFlagsDefaults();
4135
{
@@ -45,8 +39,6 @@ void __rtsan::InitializeFlags() {
4539
OverrideCommonFlags(cf);
4640
}
4741

48-
flags().SetDefaults();
49-
5042
FlagParser parser;
5143
RegisterRtsanFlags(&parser, &flags());
5244
RegisterCommonFlags(&parser);

compiler-rt/lib/rtsan/rtsan_flags.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@
1414
namespace __rtsan {
1515

1616
struct Flags {
17-
#define RTSAN_FLAG(Type, Name, DefaultValue, Description) Type Name;
17+
#define RTSAN_FLAG(Type, Name, DefaultValue, Description) \
18+
Type Name{DefaultValue};
1819
#include "rtsan_flags.inc"
1920
#undef RTSAN_FLAG
20-
21-
void SetDefaults();
2221
};
2322

2423
extern Flags flags_data;

0 commit comments

Comments
 (0)