[lld] r228381 - [Core] Update ContentPermissions

Shankar Easwaran shankare at codeaurora.org
Thu Feb 5 21:29:49 PST 2015


Author: shankare
Date: Thu Feb  5 23:29:49 2015
New Revision: 228381

URL: http://llvm.org/viewvc/llvm-project?rev=228381&view=rev
Log:
[Core] Update ContentPermissions

The values are already arranged in ascending order, and all tests still pass.

Removing the values as its confusing when new enumerations need to be added.

Modified:
    lld/trunk/include/lld/Core/DefinedAtom.h

Modified: lld/trunk/include/lld/Core/DefinedAtom.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Core/DefinedAtom.h?rev=228381&r1=228380&r2=228381&view=diff
==============================================================================
--- lld/trunk/include/lld/Core/DefinedAtom.h (original)
+++ lld/trunk/include/lld/Core/DefinedAtom.h Thu Feb  5 23:29:49 2015
@@ -157,14 +157,14 @@ public:
   // important, because the layout pass may sort atoms by permission if other
   // attributes are the same.
   enum ContentPermissions {
-    perm___  = 0,           // mapped as unaccessible
-    permR__  = 8,           // mapped read-only
-    permRW_  = 8 + 2,       // mapped readable and writable
-    permRW_L = 8 + 2 + 1,   // initially mapped r/w, then made read-only
-                            // loader writable
-    permR_X  = 8 + 4,       // mapped readable and executable
-    permRWX  = 8 + 2 + 4,   // mapped readable and writable and executable
-    permUnknown = 16        // unknown or invalid permissions
+    perm___,           // mapped as unaccessible
+    permR__,           // mapped read-only
+    permRW_,           // mapped readable and writable
+    permRW_L,           // initially mapped r/w, then made read-only
+                        // loader writable
+    permR_X,            // mapped readable and executable
+    permRWX,            // mapped readable and writable and executable
+    permUnknown         // unknown or invalid permissions
   };
 
   enum SectionChoice {





More information about the llvm-commits mailing list