mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-14 15:39:06 +00:00
Converting InstrProf's error_category to a ManagedStatic to avoid static constructors and destructors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218168 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3f71e22d8f
commit
784954db31
@ -14,6 +14,7 @@
|
||||
|
||||
#include "llvm/ProfileData/InstrProf.h"
|
||||
#include "llvm/Support/ErrorHandling.h"
|
||||
#include "llvm/Support/ManagedStatic.h"
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
@ -55,7 +56,8 @@ class InstrProfErrorCategoryType : public std::error_category {
|
||||
};
|
||||
}
|
||||
|
||||
static ManagedStatic<InstrProfErrorCategoryType> ErrorCategory;
|
||||
|
||||
const std::error_category &llvm::instrprof_category() {
|
||||
static InstrProfErrorCategoryType C;
|
||||
return C;
|
||||
return *ErrorCategory;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user