projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3f71e22
)
Converting InstrProf's error_category to a ManagedStatic to avoid static constructors...
author
Chris Bieneman
<beanz@apple.com>
Fri, 19 Sep 2014 23:19:24 +0000
(23:19 +0000)
committer
Chris Bieneman
<beanz@apple.com>
Fri, 19 Sep 2014 23:19:24 +0000
(23:19 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218168
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/ProfileData/InstrProf.cpp
patch
|
blob
|
history
diff --git
a/lib/ProfileData/InstrProf.cpp
b/lib/ProfileData/InstrProf.cpp
index 01212227206719b2ad18804960a418fce61dc574..900dff9673966a96484958924153a7c86f3d77f0 100644
(file)
--- a/
lib/ProfileData/InstrProf.cpp
+++ b/
lib/ProfileData/InstrProf.cpp
@@
-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;
}