diff options
author | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2022-07-10 09:54:30 +0200 |
---|---|---|
committer | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2022-07-10 09:54:30 +0200 |
commit | e9ce1a588030d8d4004f5d7e443afe46245e9a92 (patch) | |
tree | a70363c9aa204477b48fbf1b0cf9a0adf445ec2e /llvm/unittests/Support/ErrorTest.cpp | |
parent | e6f1f062457c928c18a88c612f39d9e168f65a85 (diff) | |
download | llvm-e9ce1a588030d8d4004f5d7e443afe46245e9a92.zip llvm-e9ce1a588030d8d4004f5d7e443afe46245e9a92.tar.gz llvm-e9ce1a588030d8d4004f5d7e443afe46245e9a92.tar.bz2 |
Revert "ManagedStatic: remove many straightforward uses in llvm"
This reverts commit e6f1f062457c928c18a88c612f39d9e168f65a85.
Reverting due to a failure on the fuchsia-x86_64-linux buildbot.
Diffstat (limited to 'llvm/unittests/Support/ErrorTest.cpp')
-rw-r--r-- | llvm/unittests/Support/ErrorTest.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/unittests/Support/ErrorTest.cpp b/llvm/unittests/Support/ErrorTest.cpp index 57dda99..547566c 100644 --- a/llvm/unittests/Support/ErrorTest.cpp +++ b/llvm/unittests/Support/ErrorTest.cpp @@ -12,6 +12,7 @@ #include "llvm/ADT/Twine.h" #include "llvm/Support/Errc.h" #include "llvm/Support/ErrorHandling.h" +#include "llvm/Support/ManagedStatic.h" #include "llvm/Testing/Support/Error.h" #include "gtest/gtest-spi.h" #include "gtest/gtest.h" @@ -1038,10 +1039,8 @@ public: } }; -const std::error_category &TErrorCategory() { - static TestErrorCategory TestErrCategory; - return TestErrCategory; -} +static llvm::ManagedStatic<TestErrorCategory> TestErrCategory; +const std::error_category &TErrorCategory() { return *TestErrCategory; } char TestDebugError::ID; |