@@ -84,22 +84,20 @@ static void InfoSignalHandler(int Sig); // defined below.
84
84
85
85
using SignalHandlerFunctionType = void (*)();
86
86
// / The function to call if ctrl-c is pressed.
87
- static std::atomic<SignalHandlerFunctionType> InterruptFunction =
88
- ATOMIC_VAR_INIT (nullptr );
89
- static std::atomic<SignalHandlerFunctionType> InfoSignalFunction =
90
- ATOMIC_VAR_INIT (nullptr );
87
+ static std::atomic<SignalHandlerFunctionType> InterruptFunction = nullptr ;
88
+ static std::atomic<SignalHandlerFunctionType> InfoSignalFunction = nullptr ;
91
89
// / The function to call on SIGPIPE (one-time use only).
92
90
static std::atomic<SignalHandlerFunctionType> OneShotPipeSignalFunction =
93
- ATOMIC_VAR_INIT ( nullptr ) ;
91
+ nullptr ;
94
92
95
93
namespace {
96
94
// / Signal-safe removal of files.
97
95
// / Inserting and erasing from the list isn't signal-safe, but removal of files
98
96
// / themselves is signal-safe. Memory is freed when the head is freed, deletion
99
97
// / is therefore not signal-safe either.
100
98
class FileToRemoveList {
101
- std::atomic<char *> Filename = ATOMIC_VAR_INIT( nullptr ) ;
102
- std::atomic<FileToRemoveList *> Next = ATOMIC_VAR_INIT( nullptr ) ;
99
+ std::atomic<char *> Filename = nullptr ;
100
+ std::atomic<FileToRemoveList *> Next = nullptr ;
103
101
104
102
FileToRemoveList () = default ;
105
103
// Not signal-safe.
@@ -188,7 +186,7 @@ public:
188
186
Head.exchange (OldHead);
189
187
}
190
188
};
191
- static std::atomic<FileToRemoveList *> FilesToRemove = ATOMIC_VAR_INIT( nullptr ) ;
189
+ static std::atomic<FileToRemoveList *> FilesToRemove = nullptr ;
192
190
193
191
// / Clean up the list in a signal-friendly manner.
194
192
// / Recall that signals can fire during llvm_shutdown. If this occurs we should
@@ -248,7 +246,7 @@ static const int InfoSigs[] = {SIGUSR1
248
246
static const size_t NumSigs = std::size(IntSigs) + std::size(KillSigs) +
249
247
std::size (InfoSigs) + 1 /* SIGPIPE */ ;
250
248
251
- static std::atomic<unsigned > NumRegisteredSignals = ATOMIC_VAR_INIT( 0 ) ;
249
+ static std::atomic<unsigned > NumRegisteredSignals = 0 ;
252
250
static struct {
253
251
struct sigaction SA;
254
252
int SigNo;
0 commit comments