From e6f1f062457c928c18a88c612f39d9e168f65a85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolai=20H=C3=A4hnle?= Date: Wed, 29 Jun 2022 14:29:33 +0200 Subject: 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 --- llvm/lib/ProfileData/Coverage/CoverageMapping.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'llvm/lib/ProfileData/Coverage/CoverageMapping.cpp') diff --git a/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp b/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp index f9e58fd..f4f13ba 100644 --- a/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp +++ b/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp @@ -25,7 +25,6 @@ #include "llvm/Support/Errc.h" #include "llvm/Support/Error.h" #include "llvm/Support/ErrorHandling.h" -#include "llvm/Support/ManagedStatic.h" #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/raw_ostream.h" #include @@ -897,10 +896,9 @@ std::string CoverageMapError::message() const { return getCoverageMapErrString(Err); } -static ManagedStatic ErrorCategory; - const std::error_category &llvm::coverage::coveragemap_category() { - return *ErrorCategory; + static CoverageMappingErrorCategoryType ErrorCategory; + return ErrorCategory; } char CoverageMapError::ID = 0; -- cgit v1.1