summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-06-03 05:12:33 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-06-03 05:12:33 +0000
commit18b40871942620776499e77811c84a66627c8b1f (patch)
tree0de32a8333c81f0654efc45510e29eaea972cfdd /include
parentdacea252b55cfb798c5e2bca91ce85ac27bbab2f (diff)
downloadllvm-18b40871942620776499e77811c84a66627c8b1f.tar.gz
llvm-18b40871942620776499e77811c84a66627c8b1f.tar.bz2
llvm-18b40871942620776499e77811c84a66627c8b1f.tar.xz
Use an enum class.
Might also fix the windows build. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210077 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/ProfileData/InstrProf.h10
1 files changed, 1 insertions, 9 deletions
diff --git a/include/llvm/ProfileData/InstrProf.h b/include/llvm/ProfileData/InstrProf.h
index 8457678c4e..b08084cd68 100644
--- a/include/llvm/ProfileData/InstrProf.h
+++ b/include/llvm/ProfileData/InstrProf.h
@@ -22,8 +22,7 @@ namespace llvm {
const error_category &instrprof_category();
-struct instrprof_error {
- enum ErrorType {
+enum class instrprof_error {
success = 0,
eof,
bad_magic,
@@ -37,11 +36,6 @@ struct instrprof_error {
hash_mismatch,
count_mismatch,
counter_overflow
- };
- ErrorType V;
-
- instrprof_error(ErrorType V) : V(V) {}
- operator ErrorType() const { return V; }
};
inline error_code make_error_code(instrprof_error E) {
@@ -49,8 +43,6 @@ inline error_code make_error_code(instrprof_error E) {
}
template <> struct is_error_code_enum<instrprof_error> : std::true_type {};
-template <> struct is_error_code_enum<instrprof_error::ErrorType>
- : std::true_type {};
} // end namespace llvm