[llvm] r210566 - Use an enum class now that they are available.
Rafael Espindola
rafael.espindola at gmail.com
Tue Jun 10 12:08:22 PDT 2014
Author: rafael
Date: Tue Jun 10 14:08:21 2014
New Revision: 210566
URL: http://llvm.org/viewvc/llvm-project?rev=210566&view=rev
Log:
Use an enum class now that they are available.
Modified:
llvm/trunk/include/llvm/Support/FileSystem.h
Modified: llvm/trunk/include/llvm/Support/FileSystem.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/FileSystem.h?rev=210566&r1=210565&r2=210566&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/FileSystem.h (original)
+++ llvm/trunk/include/llvm/Support/FileSystem.h Tue Jun 10 14:08:21 2014
@@ -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.
More information about the llvm-commits
mailing list