Twine: Stores kinds as uchar instead of bitfield to be friendlier to the
authorDaniel Dunbar <daniel@zuster.org>
Thu, 19 Nov 2009 00:04:43 +0000 (00:04 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Thu, 19 Nov 2009 00:04:43 +0000 (00:04 +0000)
optimizer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89278 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/Twine.h

index f4722db6527e6a83d2d80c1f9697948ad8f77dd1..ca0be53d481d4d0be5f3ddd62d9097ebf3382237 100644 (file)
@@ -133,9 +133,9 @@ namespace llvm {
     /// Null or Empty kinds.
     const void *RHS;
     /// LHSKind - The NodeKind of the left hand side, \see getLHSKind().
-    NodeKind LHSKind : 8;
+    unsigned char LHSKind;
     /// RHSKind - The NodeKind of the left hand side, \see getLHSKind().
-    NodeKind RHSKind : 8;
+    unsigned char RHSKind;
 
   private:
     /// Construct a nullary twine; the kind must be NullKind or EmptyKind.
@@ -209,10 +209,10 @@ namespace llvm {
     }
 
     /// getLHSKind - Get the NodeKind of the left-hand side.
-    NodeKind getLHSKind() const { return LHSKind; }
+    NodeKind getLHSKind() const { return (NodeKind) LHSKind; }
 
     /// getRHSKind - Get the NodeKind of the left-hand side.
-    NodeKind getRHSKind() const { return RHSKind; }
+    NodeKind getRHSKind() const { return (NodeKind) RHSKind; }
 
     /// printOneChild - Print one child from a twine.
     void printOneChild(raw_ostream &OS, const void *Ptr, NodeKind Kind) const;