[PATCH] D19934: [NFC] Reorder fields of VersionTuple to reduce size

Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 11 13:08:03 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL275095: [NFC] Reorder fields of VersionTuple to reduce size (authored by epilk).

Changed prior to commit:
  http://reviews.llvm.org/D19934?vs=56171&id=63560#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D19934

Files:
  cfe/trunk/include/clang/Basic/VersionTuple.h

Index: cfe/trunk/include/clang/Basic/VersionTuple.h
===================================================================
--- cfe/trunk/include/clang/Basic/VersionTuple.h
+++ cfe/trunk/include/clang/Basic/VersionTuple.h
@@ -25,39 +25,44 @@
 /// \brief Represents a version number in the form major[.minor[.subminor[.build]]].
 class VersionTuple {
   unsigned Major : 31;
+
+  unsigned UsesUnderscores : 1;
+
   unsigned Minor : 31;
-  unsigned Subminor : 31;
-  unsigned Build : 31;
   unsigned HasMinor : 1;
+
+  unsigned Subminor : 31;
   unsigned HasSubminor : 1;
+
+  unsigned Build : 31;
   unsigned HasBuild : 1;
-  unsigned UsesUnderscores : 1;
 
 public:
   VersionTuple()
-      : Major(0), Minor(0), Subminor(0), Build(0), HasMinor(false),
-        HasSubminor(false), HasBuild(false), UsesUnderscores(false) {}
+      : Major(0), UsesUnderscores(false), Minor(0), HasMinor(false),
+        Subminor(0), HasSubminor(false), Build(0), HasBuild(false) {}
 
   explicit VersionTuple(unsigned Major)
-      : Major(Major), Minor(0), Subminor(0), Build(0), HasMinor(false),
-        HasSubminor(false), HasBuild(false), UsesUnderscores(false) {}
+      : Major(Major), UsesUnderscores(false), Minor(0), HasMinor(false),
+        Subminor(0), HasSubminor(false), Build(0), HasBuild(false) {}
 
   explicit VersionTuple(unsigned Major, unsigned Minor,
                         bool UsesUnderscores = false)
-      : Major(Major), Minor(Minor), Subminor(0), Build(0), HasMinor(true),
-        HasSubminor(false), HasBuild(false), UsesUnderscores(UsesUnderscores) {}
+      : Major(Major), UsesUnderscores(UsesUnderscores), Minor(Minor),
+        HasMinor(true), Subminor(0), HasSubminor(false), Build(0),
+        HasBuild(false) {}
 
   explicit VersionTuple(unsigned Major, unsigned Minor, unsigned Subminor,
                         bool UsesUnderscores = false)
-      : Major(Major), Minor(Minor), Subminor(Subminor), Build(0),
-        HasMinor(true), HasSubminor(true), HasBuild(false),
-        UsesUnderscores(UsesUnderscores) {}
+      : Major(Major), UsesUnderscores(UsesUnderscores), Minor(Minor),
+        HasMinor(true), Subminor(Subminor), HasSubminor(true), Build(0),
+        HasBuild(false) {}
 
   explicit VersionTuple(unsigned Major, unsigned Minor, unsigned Subminor,
                         unsigned Build, bool UsesUnderscores = false)
-      : Major(Major), Minor(Minor), Subminor(Subminor), Build(Build),
-        HasMinor(true), HasSubminor(true), HasBuild(true),
-        UsesUnderscores(UsesUnderscores) {}
+      : Major(Major), UsesUnderscores(UsesUnderscores), Minor(Minor),
+        HasMinor(true), Subminor(Subminor), HasSubminor(true), Build(Build),
+        HasBuild(true) {}
 
   /// \brief Determine whether this version information is empty
   /// (e.g., all version components are zero).


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19934.63560.patch
Type: text/x-patch
Size: 2830 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160711/e524f556/attachment.bin>


More information about the cfe-commits mailing list