aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ProfileData/SampleProf.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 09:15:08 +0200
commite6f1f062457c928c18a88c612f39d9e168f65a85 (patch)
treeb90f5190cbeabf748e143602c280c37567d78850 /llvm/lib/ProfileData/SampleProf.cpp
parentda6a14b91ad999327b41a9040577273591e4ad1d (diff)
downloadllvm-e6f1f062457c928c18a88c612f39d9e168f65a85.zip
llvm-e6f1f062457c928c18a88c612f39d9e168f65a85.tar.gz
llvm-e6f1f062457c928c18a88c612f39d9e168f65a85.tar.bz2
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
Diffstat (limited to 'llvm/lib/ProfileData/SampleProf.cpp')
-rw-r--r--llvm/lib/ProfileData/SampleProf.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/ProfileData/SampleProf.cpp b/llvm/lib/ProfileData/SampleProf.cpp
index f794e64..b4d5550 100644
--- a/llvm/lib/ProfileData/SampleProf.cpp
+++ b/llvm/lib/ProfileData/SampleProf.cpp
@@ -20,7 +20,6 @@
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
-#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/raw_ostream.h"
#include <string>
#include <system_error>
@@ -98,10 +97,9 @@ class SampleProfErrorCategoryType : public std::error_category {
} // end anonymous namespace
-static ManagedStatic<SampleProfErrorCategoryType> ErrorCategory;
-
const std::error_category &llvm::sampleprof_category() {
- return *ErrorCategory;
+ static SampleProfErrorCategoryType ErrorCategory;
+ return ErrorCategory;
}
void LineLocation::print(raw_ostream &OS) const {