From e9ce1a588030d8d4004f5d7e443afe46245e9a92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolai=20H=C3=A4hnle?= Date: Sun, 10 Jul 2022 09:54:30 +0200 Subject: Revert "ManagedStatic: remove many straightforward uses in llvm" This reverts commit e6f1f062457c928c18a88c612f39d9e168f65a85. Reverting due to a failure on the fuchsia-x86_64-linux buildbot. --- llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp') diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index f2e7b48c911f..47c79cdb8493 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 ErrorCategory; + const std::error_category &llvm::BitcodeErrorCategory() { - static BitcodeErrorCategoryType ErrorCategory; - return ErrorCategory; + return *ErrorCategory; } static Expected readBlobInRecord(BitstreamCursor &Stream, -- cgit v1.2.3