Revert "ManagedStatic: remove many straightforward uses in llvm"

This reverts commit e6f1f06245.

Reverting due to a failure on the fuchsia-x86_64-linux buildbot.
This commit is contained in:
Nicolai Hähnle
2022-07-10 09:54:30 +02:00
parent e6f1f06245
commit e9ce1a5880
34 changed files with 162 additions and 164 deletions

View File

@@ -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,