aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorNicolai Hähnle <nicolai.haehnle@amd.com>2022-07-10 09:54:30 +0200
committerNicolai Hähnle <nicolai.haehnle@amd.com>2022-07-10 09:54:30 +0200
commite9ce1a588030d8d4004f5d7e443afe46245e9a92 (patch)
treea70363c9aa204477b48fbf1b0cf9a0adf445ec2e /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parente6f1f062457c928c18a88c612f39d9e168f65a85 (diff)
downloadllvm-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/lib/Bitcode/Reader/BitcodeReader.cpp')
-rw-r--r--llvm/lib/Bitcode/Reader/BitcodeReader.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index f2e7b48..47c79cdb 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -69,6 +69,7 @@
#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"
@@ -7445,9 +7446,10 @@ class BitcodeErrorCategoryType : public std::error_category {
} // end anonymous namespace
+static ManagedStatic<BitcodeErrorCategoryType> ErrorCategory;
+
const std::error_category &llvm::BitcodeErrorCategory() {
- static BitcodeErrorCategoryType ErrorCategory;
- return ErrorCategory;
+ return *ErrorCategory;
}
static Expected<StringRef> readBlobInRecord(BitstreamCursor &Stream,