aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
diff options
context:
space:
mode:
authorNicolai Hähnle <nicolai.haehnle@amd.com>2022-06-29 14:29:33 +0200
committerNicolai Hähnle <nicolai.haehnle@amd.com>2022-07-10 10:29:15 +0200
commitede600377cb6df1bef71f070130d8cfe734cc5b7 (patch)
tree0e9d4a1c99ad8e2516568ec42be86f1fbe0c6737 /llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
parente9ce1a588030d8d4004f5d7e443afe46245e9a92 (diff)
downloadllvm-ede600377cb6df1bef71f070130d8cfe734cc5b7.zip
llvm-ede600377cb6df1bef71f070130d8cfe734cc5b7.tar.gz
llvm-ede600377cb6df1bef71f070130d8cfe734cc5b7.tar.bz2
ManagedStatic: remove many straightforward uses in llvm
(Reapply after revert in e9ce1a588030d8d4004f5d7e443afe46245e9a92 due to Fuchsia test failures. Removed changes in lib/ExecutionEngine/ other than error categories, to be checked in more detail and reapplied separately.) 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/ProfileData/Coverage/CoverageMapping.cpp')
-rw-r--r--llvm/lib/ProfileData/Coverage/CoverageMapping.cpp6
1 files changed, 2 insertions, 4 deletions
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 <algorithm>
@@ -897,10 +896,9 @@ std::string CoverageMapError::message() const {
return getCoverageMapErrString(Err);
}
-static ManagedStatic<CoverageMappingErrorCategoryType> ErrorCategory;
-
const std::error_category &llvm::coverage::coveragemap_category() {
- return *ErrorCategory;
+ static CoverageMappingErrorCategoryType ErrorCategory;
+ return ErrorCategory;
}
char CoverageMapError::ID = 0;