diff options
author | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2022-06-29 14:29:33 +0200 |
---|---|---|
committer | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2022-07-10 09:15:08 +0200 |
commit | e6f1f062457c928c18a88c612f39d9e168f65a85 (patch) | |
tree | b90f5190cbeabf748e143602c280c37567d78850 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
parent | da6a14b91ad999327b41a9040577273591e4ad1d (diff) | |
download | llvm-e6f1f062457c928c18a88c612f39d9e168f65a85.zip llvm-e6f1f062457c928c18a88c612f39d9e168f65a85.tar.gz llvm-e6f1f062457c928c18a88c612f39d9e168f65a85.tar.bz2 |
ManagedStatic: remove many straightforward uses in llvm
Bulk remove many of the more trivial uses of ManagedStatic in the llvm
directory, either by defining a new getter function or, in many cases,
moving the static variable directly into the only function that uses it.
Differential Revision: https://reviews.llvm.org/D129120
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index 47c79cdb..f2e7b48 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -69,7 +69,6 @@ #include "llvm/Support/Error.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/ErrorOr.h" -#include "llvm/Support/ManagedStatic.h" #include "llvm/Support/MathExtras.h" #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/raw_ostream.h" @@ -7446,10 +7445,9 @@ class BitcodeErrorCategoryType : public std::error_category { } // end anonymous namespace -static ManagedStatic<BitcodeErrorCategoryType> ErrorCategory; - const std::error_category &llvm::BitcodeErrorCategory() { - return *ErrorCategory; + static BitcodeErrorCategoryType ErrorCategory; + return ErrorCategory; } static Expected<StringRef> readBlobInRecord(BitstreamCursor &Stream, |