diff options
author | Fangrui Song <i@maskray.me> | 2023-02-24 13:43:12 -0800 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2023-02-24 13:43:12 -0800 |
commit | 1c417da0f0605e027eb02fb4108d08397b566c3b (patch) | |
tree | 363730962167610d59624f418f197e1cfe63947c /llvm/lib/Support/PrettyStackTrace.cpp | |
parent | 8f0814f5dcdc29a01d0d3e87d07227f553472a51 (diff) | |
download | llvm-1c417da0f0605e027eb02fb4108d08397b566c3b.zip llvm-1c417da0f0605e027eb02fb4108d08397b566c3b.tar.gz llvm-1c417da0f0605e027eb02fb4108d08397b566c3b.tar.bz2 |
Remove uses of ATOMIC_VAR_INIT
ATOMIC_VAR_INIT has a trivial definition `#define ATOMIC_VAR_INIT(value) (value)`,
is deprecated in C17/C++20, and will be removed in newer standards.
Diffstat (limited to 'llvm/lib/Support/PrettyStackTrace.cpp')
-rw-r--r-- | llvm/lib/Support/PrettyStackTrace.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Support/PrettyStackTrace.cpp b/llvm/lib/Support/PrettyStackTrace.cpp index fa91405..f9f1b8a 100644 --- a/llvm/lib/Support/PrettyStackTrace.cpp +++ b/llvm/lib/Support/PrettyStackTrace.cpp @@ -64,8 +64,7 @@ static LLVM_THREAD_LOCAL PrettyStackTraceEntry *PrettyStackTraceHead = nullptr; // the current thread". If the user happens to overflow an 'unsigned' with // SIGINFO requests, it's possible that some threads will stop responding to it, // but the program won't crash. -static volatile std::atomic<unsigned> GlobalSigInfoGenerationCounter = - ATOMIC_VAR_INIT(1); +static volatile std::atomic<unsigned> GlobalSigInfoGenerationCounter = 1; static LLVM_THREAD_LOCAL unsigned ThreadLocalSigInfoGenerationCounter = 0; namespace llvm { |