Use an enum class now that they are available.
authorRafael Espindola <rafael.espindola@gmail.com>
Tue, 10 Jun 2014 19:08:21 +0000 (19:08 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Tue, 10 Jun 2014 19:08:21 +0000 (19:08 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210566 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/FileSystem.h

index a9ed8029219d25608aae094bd73e022dfb895e4a..271cec3a09f31eb94a8251d18cd63977f13ebd5f 100644 (file)
@@ -49,26 +49,18 @@ namespace llvm {
 namespace sys {
 namespace fs {
 
-/// An "enum class" enumeration for the file system's view of the type.
-struct file_type {
-  enum Impl {
-    status_error,
-    file_not_found,
-    regular_file,
-    directory_file,
-    symlink_file,
-    block_file,
-    character_file,
-    fifo_file,
-    socket_file,
-    type_unknown
-  };
-
-  file_type(Impl V) : V(V) {}
-  operator Impl() const { return V; }
-
-private:
-  Impl V;
+/// An enumeration for the file system's view of the type.
+enum class file_type {
+  status_error,
+  file_not_found,
+  regular_file,
+  directory_file,
+  symlink_file,
+  block_file,
+  character_file,
+  fifo_file,
+  socket_file,
+  type_unknown
 };
 
 /// space_info - Self explanatory.