Skip to content

Commit 9ffce95

Browse files
committed
[llvm-lto2] Replace std::atomic_init with brace initiation. NFC
In C++ 20, std::atomic_init is deprecated. This patch replaces call to std::atomic_init with brace initiation.
1 parent d570409 commit 9ffce95

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/tools/llvm-lto2/llvm-lto2.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,8 +394,7 @@ static int run(int argc, char **argv) {
394394
// behavior. Instead, we don't exit in the multi-threaded case, but we make
395395
// sure to report the error and then at the end (after joining cleanly)
396396
// exit(1).
397-
std::atomic<bool> HasErrors;
398-
std::atomic_init(&HasErrors, false);
397+
std::atomic<bool> HasErrors{false};
399398
Conf.DiagHandler = [&](const DiagnosticInfo &DI) {
400399
DiagnosticPrinterRawOStream DP(errs());
401400
DI.print(DP);

0 commit comments

Comments
 (0)