From 810f06ec3e87e924f9cf1a60f1440663f8f70d82 Mon Sep 17 00:00:00 2001 From: scuzqy <80660355+scuzqy@users.noreply.github.com> Date: Fri, 29 Aug 2025 06:09:20 +0800 Subject: [llvm-lto2] Replace std::atomic_init with brace initiation. NFC (#143274) In C++ 20, std::atomic_init is deprecated. This patch replaces call to std::atomic_init with brace initiation. --- llvm/tools/llvm-lto2/llvm-lto2.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'llvm/tools/llvm-lto2/llvm-lto2.cpp') diff --git a/llvm/tools/llvm-lto2/llvm-lto2.cpp b/llvm/tools/llvm-lto2/llvm-lto2.cpp index d27a219..dd9b6ba 100644 --- a/llvm/tools/llvm-lto2/llvm-lto2.cpp +++ b/llvm/tools/llvm-lto2/llvm-lto2.cpp @@ -394,8 +394,7 @@ static int run(int argc, char **argv) { // behavior. Instead, we don't exit in the multi-threaded case, but we make // sure to report the error and then at the end (after joining cleanly) // exit(1). - std::atomic HasErrors; - std::atomic_init(&HasErrors, false); + std::atomic HasErrors{false}; Conf.DiagHandler = [&](const DiagnosticInfo &DI) { DiagnosticPrinterRawOStream DP(errs()); DI.print(DP); -- cgit v1.1